Coder Social home page Coder Social logo

akotovets1 / credit_risk_analysis Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 221 KB

Supervised Machine Learning and Credit Risk

Jupyter Notebook 100.00%
adaboost balanced-random-forest cluster-centroids-algorithm confusion-matrix easy-ensemble-classifier imbalanced-learning machine-learning random-over-sampling scikitlearn-machine-learning smote-algorithm

credit_risk_analysis's Introduction

Credit_Risk_Analysis

Overview

Data analysts were asked to examine credit card data from a peer-to-peer lending services company in order to determine credit risk. Supervised machine learning was used to find out which model would perform the best with an unbalanced dataset. Several models have been applied and used to predict credit risk.

Dependencies

  • Jupyter Notebook
  • Python v3.x
    • Dependencies
      • Numpy
      • Pandas
      • Pathlib
      • Collections
      • SKLearn
      • ImbalancedLearn

Results

Naive Random Oversampling

Pic 1

1.Balanced Accuracy: 0.6497536370265621

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.62/0.68

SMOTE Oversampling

Pic 2

1.Balanced Accuracy: 0.6443721269403855

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.63/0.66

Undersampling

Pic 3

1.Balanced Accuracy: 0.6443721269403855

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.61/0.45

Combination Under-Over Sampling

Pic 4

1.Balanced Accuracy: 0.529127435931526

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.70/0.57

Balanced Random Forest Classifier

Pic 5

1.Balanced Accuracy: 0.7877672625306695

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.67/0.91

Easy Ensemble AdaBoost Classifier

Pic 6

1.Balanced Accuracy: 0.9316600714093861

2.Precision: The precision is low for High-risk loans and is high for Low-risk loans.

3.Recall: High/Low risk = 0.67/0.91

Summary

For this dataset, the Easy Ensemble AdaBoost Classifier is the best model because it has 0.93 balanced accuracy (the highest compared accuracy between 0 and 1 and is closest to 1 is the best machine learning model). The Easy Ensemble AdaBoost Classifier also has the highest recall score (the better model needs to has the recall score closer to 1).

So, the best supervised machine learning model for further credit card analysis is the Easy Ensemble AdaBoost Classifier. Out of the six machine learning algorithms tested, Easy Ensemble AdaBoost Classifier performed the best result.

credit_risk_analysis's People

Contributors

akotovets avatar akotovets1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.