Skip to content

About

Python-based machine learning model that predicts loan credit risk using classification algorithms, trained on applicant financial data.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Loan Credit Risk Classifier

A machine learning project that predicts loan approval risk using applicant financial and demographic information.

Project Overview

This project uses a Random Forest Classifier to analyze loan applicant information and predict whether a loan application is likely to be approved.

The project includes:

  • Data preprocessing
  • Missing-value handling
  • Categorical feature encoding
  • Random Forest classification
  • Model evaluation
  • Prediction system
  • Interactive Streamlit web application

Machine Learning Model

Algorithm: Random Forest Classifier

The model is trained using the following applicant information:

  • Gender
  • Marital Status
  • Dependents
  • Education
  • Self Employment
  • Applicant Income
  • Coapplicant Income
  • Loan Amount
  • Loan Amount Term
  • Credit History
  • Property Area

Loan_ID is removed because it does not provide useful information for prediction.


Model Performance

The current model achieved:

Test Accuracy: 82.11%

Classification performance:

Class Precision Recall F1-Score
N 0.75 0.63 0.69
Y 0.85 0.91 0.88

Technologies Used

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Joblib
  • Streamlit
  • Git & GitHub

Installation & Usage

Clone Repository

git clone https://github.com/yesajayyy/Loan-Credit-Risk-Classifier.git

Navigate to Project Folder

cd Loan-Credit-Risk-Classifier

Install Required Libraries

pip install -r requirements.txt

Run the Application

streamlit run app/app.py

🌐 Live Demo

The Loan Credit Risk Classifier application is deployed and available online.

Try the live application here:

🔗 https://loan-credit-risk-classifier-zpkqtcmujvjongwjgdb72t.streamlit.app/

The model is trained using loan applicant data containing financial and demographic information.

Features include:

  • Applicant details
  • Income information
  • Loan details
  • Credit history
  • Property information

The dataset is used to classify loan applications into different risk categories.


📁 Project Structure

Loan-Credit-Risk-Classifier/
│
├── app/
│   └── app.py
│
├── data/
│   └── train.csv
│
├── models/
│   └── loan_risk_model.pkl
│
├── src/
│   ├── train.py
│   └── predict.py
│
├── images/
│   └── app_screenshot.png
│
├── notebooks/
│
├── .gitignore
├── requirements.txt
└── README.md


Future Improvements

  • Deploy the application using Streamlit Cloud
  • Add advanced machine learning algorithms
  • Improve model accuracy using hyperparameter tuning
  • Implement Explainable AI techniques like SHAP
  • Add more financial features for better prediction

Author

Guguloth Ajay

Electronics and Instrumentation Engineering Student

GitHub: https://github.com/yesajayyy

About

Python-based machine learning model that predicts loan credit risk using classification algorithms, trained on applicant financial data.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages