Mortgages, student and auto loans, and debt consolidation are just a few examples of credit and loans that people seek online. Peer-to-peer lending services such as Loans Canada and Mogo let investors loan people money without using a bank. However, because investors always want to mitigate risk, a client has asked that you help them predict credit risk with machine learning techniques.
In this assignment you will build and evaluate several machine learning models to predict credit risk using data you'd typically see from peer-to-peer lending services. Credit risk is an inherently imbalanced classification problem (the number of good loans is much larger than the number of at-risk loans), so you will need to employ different techniques for training and evaluating models with imbalanced classes. You will use the imbalanced-learn and Scikit-learn libraries to build and evaluate models using the two following techniques:
- Resampling
- Ensemble Learning
-
Resampling Starter Notebook
-
Ensemble Starter Notebook
-
Lending Club Loans Data
In the first part of the project, the following resampling techniques were used:
-
Oversampling the data using the Naive Random Oversampler and SMOTE algorithms.
-
Undersampling the data using the Cluster Centroids algorithm.
-
Over- and undersample using a combination SMOTEENN algorithm.
For each method used, the following scores were calculated:
-
Balanced accuracy score
-
Confusion matrix
-
Imbalanced classification report.
In the second part of the project, I trained and compared two different ensemble classifiers to predict loan risk, Balanced Random Forest Classifier and the Easy Ensemble Classifier.