An open API service indexing awesome lists of open source software.

https://github.com/nishumehta/loan-default-prediction

A machine learning web app to predict the likelihood of a loan default based on applicant data. Trained Logistic Regression, Random Forest, and XGBoost models. Built with Python, Streamlit, and deployed on Streamlit Cloud.
https://github.com/nishumehta/loan-default-prediction

logistic-regression machine-learning python random-forest streamlit web-app xgboost

Last synced: about 2 months ago
JSON representation

A machine learning web app to predict the likelihood of a loan default based on applicant data. Trained Logistic Regression, Random Forest, and XGBoost models. Built with Python, Streamlit, and deployed on Streamlit Cloud.

Awesome Lists containing this project

README

          

# Loan Default Risk Predictor

This project predicts whether a loan applicant is likely to **default** using machine learning. It provides a user-friendly **Streamlit web app** where users can input applicant data and receive a risk prediction instantly.

## Live App
[Click here to try the app](https://loan-default-prediction-nishu.streamlit.app/)

![](/images/Demo_1.png)
![](/images/Demo_2.png)

---
## Features

- **24 input fields** based on user profile and financial history
- Clean interface with two-column input layout
- Prediction label: `Default` or `No Default`
- Confidence score from logistic regression

---

## Dataset Overview

Each row in the dataset contains features like:

- `Age`, `Income`, `LoanAmount`, `CreditScore`, `DTIRatio`
- Binary indicators: `HasMortgage`, `HasDependents`, `HasCoSigner`
- Encoded categorical features: `Education`, `EmploymentType`, `MaritalStatus`, `LoanPurpose`

---

## Model Training

Three models were trained:

| Model | ROC-AUC Score |
|--------------------|---------------|
| Logistic Regression| **0.7531** (Best) |
| Random Forest | 0.7390 |
| XGBoost | 0.7409 |

The final deployed model is **Logistic Regression** due to its balance of accuracy, interpretability, and low overfitting.

---

## How to Run Locally

```bash
git clone https://github.com/NishuMehta/Loan-Default-Prediction.git
cd Loan-Default-Prediction
pip install -r requirements.txt
streamlit run app/main.py

## Author

- [Nishu Mehta](https://github.com/NishuMehta)

## Project Link

[GitHub Repository](https://github.com/NishuMehta/Loan-Default-Prediction)