In this project, we build a Credit Risk Modeling system using Python and Machine Learning from scratch. The goal is to predict whether a loan applicant is a good or bad credit risk based on their financial and demographic information.
This project demonstrates a complete end-to-end data science workflow, covering data preprocessing, feature encoding, model training, evaluation, and deployment using Streamlit.
It is designed to help:
- 🚀 Beginners understand real-world ML workflows
- 🎯 Students prepare for data science & ML interviews
- 🧠 Learners practice credit risk analysis used in the finance industry
👉 Streamlit App: 🔗 https://credit-risk-modeling-using-ml.streamlit.app/
- Real-world financial credit dataset
- Data cleaning & preprocessing
- Handling categorical variables using encoders
- Training an Extra Trees Classifier
- Credit risk prediction: Good / Bad
- Interactive Streamlit web app
- End-to-end ML project (Model → App → Deployment)
-
Programming Language: Python
-
Libraries:
- Pandas
- NumPy
- Scikit-learn
- Joblib
- Streamlit
-
Model Used: Extra Trees Classifier
-
Deployment: Streamlit Cloud
Credit-Risk-Modeling-Using-ML/
│
├── app.py # Streamlit application
├── extra_tree_credit_model.pkl # Trained ML model
├── Sex_encoder.pkl
├── Housing_encoder.pkl
├── Saving accounts_encoder.pkl
├── Checking account_encoder.pkl
├── credit_dashboard.png # Dashboard image
├── requirements.txt # Project dependencies
├── runtime.txt # Python version for deployment
└── README.md # Project documentation
-
User enters applicant details (age, job, housing, accounts, etc.)
-
Inputs are encoded using saved encoders
-
The trained ML model predicts credit risk
-
Result is displayed as:
- ✅ GOOD credit risk
- ❌ BAD credit risk
- Feature engineering and encoding
- Handling categorical variables
- Tree-based ensemble model
- Robust performance on unseen data
- Saved using
joblibfor deployment
git clone https://github.com/Dharmendra-07/Credit-Risk-Modeling-Using-ML.git
cd credit-risk-modeling-using-ml
pip install -r requirements.txt
streamlit run app.pyBy completing this project, you will learn:
- How credit risk models work in finance
- How to preprocess real-world datasets
- How to use Scikit-learn for classification
- How to deploy ML models using Streamlit
- How to build portfolio-ready data science projects
Dharmendra Kumar Data Science & Machine Learning Enthusiast 📍 IIT Madras
Give it a ⭐ on GitHub — it really helps and motivates me to build more projects like this!
