Skip to content

sidmaji/Loan-Default-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loan Default Risk Predictor

This project provides a web-based tool for predicting the probability of loan default using three machine learning models: Logistic Regression, XGBoost, and a Feedforward Neural Network (FFNN). The goal is to assist in evaluating borrower risk based on financial and demographic information.

Try the Loan Default Risk Predictor on HuggingFace Spaces 🤗

Features

  • Interactive Gradio Interface: Easily input borrower data through dropdowns and number fields.
  • Multi-Model Predictions: View default probabilities from Logistic Regression, XGBoost, and FFNN models.
  • Derived Financial Metrics: Automatically computes ratios like Affordability Ratio, Total Interest, Debt-to-Income Ratio, and Average Borrowed per Credit Line.
  • Data Preprocessing: Includes standardization and Box-Cox transformation for skewed features.
  • Model Interpretability: Outputs both probability scores and binary classification (Default / No Default) for each model.

Technologies Used

  • Python (Pandas, NumPy, Scikit-learn, XGBoost, TensorFlow/Keras)
  • Gradio for the web interface
  • Joblib / Pickle for model and transformer serialization

Getting Started Locally

Prerequisites

  • Python 3.9+

Running the App

  1. Clone the repository:
    git clone <repository-url>
  2. Install the required packages:
    pip install -r requirements.txt
  3. Navigate to the project directory:
    cd loan_default_prediction
  4. Run the app:
    python app.py

About

A machine learning tool that predicts the risk of loan default using borrower financial data and outputs model probabilities and classifications from logistic regression, XGBoost, and a neural network.

Topics

Resources

Stars

Watchers

Forks

Contributors