Learn practical skills, build real-world projects, and advance your career

alt

Classification with Python

In this notebook we try to practice all the classification algorithms that we learned in this course.

We load a dataset using Pandas library, and apply the following algorithms, and find the best one for this specific dataset by accuracy evaluation methods.

Lets first load required libraries:

import itertools
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter
import pandas as pd
import numpy as np
import matplotlib.ticker as ticker
from sklearn import preprocessing
%matplotlib inline

About dataset

This dataset is about past loans. The Loan_train.csv data set includes details of 346 customers whose loan are already paid off or defaulted. It includes following fields:

FieldDescription
Loan_statusWhether a loan is paid off on in collection
PrincipalBasic principal loan amount at the
TermsOrigination terms which can be weekly (7 days), biweekly, and monthly payoff schedule
Effective_dateWhen the loan got originated and took effects
Due_dateSince it’s one-time payoff schedule, each loan has one single due date
AgeAge of applicant
EducationEducation of applicant
GenderThe gender of applicant