GithubHelp home page GithubHelp logo

financial_loan_risk_assessment's Introduction

Financial Loan Risk Assessment

Overview

This group project was developed with the goal of assessing financial loan risks using a dataset sourced from Kaggle. This dataset includes fictional data, consisting of approximately 32,000 records and 12 columns, where each row represents one loan record for one client.

Title Image

Data Source

Data Preparation

Cleaning

  • Removed duplicate rows.
  • Deleted age values greater than 100.
  • Removed employment length values over 80 years.
  • Dropped rows with missing values (NaNs).
  • Excluded records where the interest rate equals 0%.

Transformations

  • Performed one-hot and label encoding on categorical data.
  • Encoded cb_person_default_on_file with Y/N to 0/1.
  • Transformed loan_grade from A to E.
  • One-hot encoded person_home_ownership categories (Own, Rent, Mortgage).
  • Encoded various loan_intent.

Train/Test Split and Scaling

  • Split data into training and testing sets with a test size of 20% and a random state of 0.
  • Applied MinMaxScaler for normalization.

Models Tested

Classification Models

Targets:

  • Loan Status: Identified profiles of clients more or less likely to default.
  • cb_person_default_on_file: Profiled historically defaulting clients.

Regression Models

Target:

  • Loan Amount: Explored the association of loan amount with other numerical indicators.

Models Image

Model Selection

  • Employed a weighted average F1 Score for classification models.
  • Used weighted average R2 Score for regression models.
  • Selected models include KNN, Decision Tree, Logistic Regression, Bagging & Pasting, Random Forest, Ada Boosting, and Gradient Boosting.

Key Findings

Application: Loan Status Target

Low Default Risk Profile

  • Higher income, lack of previous defaults, home mortgage, and homeownership.

High Default Risk Profile

  • Higher loan percentage of income, renters, previous defaults, and higher interest rates.

Application Image

Application: Loan Amount

  • Developed targeted loan products and marketing strategies based on customer segmentation by age, income, and loan reason.
  • Formulated strategies for interest rate assessments based on loan amounts.

Loan Amount Target Image

Conclusion

The project successfully implemented multiple machine learning models to assess and predict financial loan risks. The Random Forest model showed the highest accuracy in predicting loan amounts, while the Random Patches and Gradient Boosting models excelled in the loan status classification.

Contributors

Thank You Image

financial_loan_risk_assessment's People

Contributors

darceeanne 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.