Skip to content

Supervised Machin Learning Analysis using scikit-learn and imbalanced-learn libraries.

Notifications You must be signed in to change notification settings

Wamuza1/Credit_Risk_Analysis

Repository files navigation

Credit_Risk_Analysis

Overview of the Project

Credit risk is an inherently unbalanced classification problem, as good loans easily outnumber risky loans.The purpose of this analysis is to create a supervised machine learning model that accurately predict credit risk. We evaluated various machine learning models to determine which is better at predicting credit risk. We used following algorithms/techniques.

Naive Random Oversampling, SMOTE Oversampling, Cluster Centroid Undersampling, SMOTEENN Sampling, Balanced Random Forest Classifying, Easy Ensemble Classifying.

Use Resampling Models to Predict Credit Risk

Naive Random Oversampling

-Accuracy Score: 66% -Precision High Risk: 1% -Precision Low Risk: 100% -Recall High Risk: 71% -Recall Low Risk: 61%

image

SMOTE Oversampling

-Accuracy Score: 66.2% -Precision High Risk: 1% -Precision Low Risk: 100% -Recall High Risk: 63% -Recall Low Risk: 69%

image

Cluster Centroid Undersampling

Accuracy Score: 54.4% Precision High Risk: 1% Precision Low Risk: 100% Recall High Risk: 69% Recall Low Risk: 4o%

image

Use the SMOTEENN algorithm to Predict Credit Risk

SMOTEENN Sampling

Accuracy Score: 67.4% Precision High Risk: 1% Precision Low Risk: 100% Recall High Risk: 75% Recall Low Risk: 60%

image

Use Ensemble Classifiers to Predict Credit Risk

Balanced Random Forest Classifying

Accuracy Score: 78.7% Precision High Risk: 4% Precision Low Risk: 100% Recall High Risk: 67% Recall Low Risk: 91%

image

Easy Ensemble Classifying

Accuracy Score: 92.5% Precision High Risk: 7% Precision Low Risk: 100% Recall High Risk: 91% Recall Low Risk: 94%

image

Summary

By Looking at the different models outcome, we can say that the models that perform better is "Easy Ensemble Classifying with 91% Recall high risk. Also the percision is lower compared to other models. This model would be the first recommendation performing credit risk analusis.