The purpose of this project is to analyze the credit card credit dataset from LendingClub, a peer-to-peer lending services company, Then using oversample the data using the RandomOverSampler and SMOTE algorithms, and undersample the data using the ClusterCentroids algorithm. Then, use a combinatorial approach of over-and undersampling using the SMOTEENN algorithm. Next, compare two new machine learning models that reduce bias, BalancedRandomForestClassifier, and EasyEnsembleClassifier, to predict credit risk.
Using my knowledge of the imbalanced-learn and scikit-learn libraries, I evaluate three machine learning models by using resampling to determine which is better at predicting credit risk. Use the oversampling RandomOverSampler and SMOTE algorithms, and then use the undersampling ClusterCentroids algorithm. Using these algorithms, I resample the dataset, view the count of the target classes, train a logistic regression classifier, calculate the balanced accuracy score, generate a confusion matrix, and generate a classification report.
Using my knowledge of the imbalanced-learn and scikit-learn libraries, I used a combinatorial approach of over-and undersampling with the SMOTEENN algorithm to determine if the results from the combinatorial approach are better at predicting credit risk than the resampling algorithms from Deliverable 1. Using the SMOTEENN algorithm, I resample the dataset, view the count of the target classes, train a logistic regression classifier, calculate the balanced accuracy score, generate a confusion matrix, and generate a classification report.
- To determine which model is best at predicting high-risk loans, we undersampled, oversampled, and combined both. Using ensemble classifiers, we resampled the data using the next two models in order to predict which loans are high or low risk. Oversampling, undersampling, and mixed models have low recall and our accuracy score is not as high as ensemble classifiers.
- I would suggest using the ensemble classifiers over the models. Easy Ensemble had the best balance of all the models because of its high accuracy score and a good balance of precision and recall scores.