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.
- Host: GitHub
- URL: https://github.com/nishumehta/loan-default-prediction
- Owner: NishuMehta
- Created: 2025-07-04T16:56:21.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-08T04:22:11.000Z (12 months ago)
- Last Synced: 2025-09-24T16:59:28.124Z (9 months ago)
- Topics: logistic-regression, machine-learning, python, random-forest, streamlit, web-app, xgboost
- Language: Jupyter Notebook
- Homepage: https://loan-default-prediction-nishu.streamlit.app/
- Size: 8.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
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/)


---
## 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)