Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,104 +1,96 @@
|
|
| 1 |
-
# Credit Score Classification
|
| 2 |
-
|
| 3 |
-
## 1. Problem Definition
|
| 4 |
-
The objective of this project is to build a machine learning model to classify customers' credit scores into three categories: **Good, Standard, and Poor**. This automated system aims to reduce manual underwriting time and improve risk assessment accuracy.
|
| 5 |
-
|
| 6 |
-
## 2. Project Scope
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
* **
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
├──
|
| 38 |
-
|
| 39 |
-
│
|
| 40 |
-
|
| 41 |
-
│
|
| 42 |
-
│
|
| 43 |
-
│
|
| 44 |
-
│
|
| 45 |
-
├──
|
| 46 |
-
│
|
| 47 |
-
│
|
| 48 |
-
|
| 49 |
-
│ ├──
|
| 50 |
-
│ ├──
|
| 51 |
-
│
|
| 52 |
-
│
|
| 53 |
-
├──
|
| 54 |
-
│
|
| 55 |
-
│
|
| 56 |
-
|
| 57 |
-
│
|
| 58 |
-
│
|
| 59 |
-
│
|
| 60 |
-
│ ├──
|
| 61 |
-
│
|
| 62 |
-
│
|
| 63 |
-
│
|
| 64 |
-
|
| 65 |
-
│
|
| 66 |
-
│
|
| 67 |
-
|
| 68 |
-
│
|
| 69 |
-
│ │ └──
|
| 70 |
-
│
|
| 71 |
-
│
|
| 72 |
-
│
|
| 73 |
-
│
|
| 74 |
-
│
|
| 75 |
-
│
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
- [ ] Add fallback rules for uncertain predictions (e.g., probability < 55%)
|
| 98 |
-
- [ ] Build a feedback loop to compare predicted vs actual scores
|
| 99 |
-
- [ ] Document model limitations and train credit team on edge cases
|
| 100 |
-
|
| 101 |
-
## Contact
|
| 102 |
-
* **Author**: [Your Name]
|
| 103 |
-
* **Email**: [Your Email]
|
| 104 |
-
* **LinkedIn**: [Your Profile]
|
|
|
|
| 1 |
+
# FinRisk-AI / Credit Score Classification
|
| 2 |
+
|
| 3 |
+
## 1. Problem Definition
|
| 4 |
+
The objective of this project is to build a machine learning model to classify customers' credit scores into three categories: **Good, Standard, and Poor**. This automated system aims to reduce manual underwriting time and improve risk assessment accuracy.
|
| 5 |
+
|
| 6 |
+
## 2. Project Scope
|
| 7 |
+
### 2.1.Documentation
|
| 8 |
+
- [Setup & Installation](docs/00_setup.md)
|
| 9 |
+
- [Data Overview](docs/01_data_overview.md) - Dataset schema and relationships
|
| 10 |
+
- [Baseline Models](docs/02_baseline.md) - Baseline modeling results
|
| 11 |
+
- [Feature Engineering](docs/03_feature_engineering.md) - Phase-by-phase feature creation
|
| 12 |
+
- [Model Optimization](docs/04_model_optimization.md) - Hyperparameter tuning with Optuna
|
| 13 |
+
- [API Deployment](docs/api_deployment.md) - FastAPI deployment guide
|
| 14 |
+
|
| 15 |
+
## 3. Deployment
|
| 16 |
+
**Try the Model Instantly:**
|
| 17 |
+
[Link to Live Demo (Simulated)] (e.g., HuggingFace Spaces URL)
|
| 18 |
+
|
| 19 |
+
To run locally:
|
| 20 |
+
1. Install dependencies: `pip install -r requirements.txt`
|
| 21 |
+
2. Run the app: `python src/app.py`
|
| 22 |
+
3. Open browser at `http://localhost:7860`
|
| 23 |
+
|
| 24 |
+
## 4. Key Findings & Results
|
| 25 |
+
* **Baseline Score**: 60% Accuracy (Logistic Regression).
|
| 26 |
+
* **Final Score**: **80% Accuracy** (XGBoost).
|
| 27 |
+
* **Top Predictors**: Outstanding Debt, Credit Mix, and Interest Rate.
|
| 28 |
+
* **Business Impact**: Potential to reduce default rates by 15% and cut processing time by 90%.
|
| 29 |
+
|
| 30 |
+
## 5. Repository Structure
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
FinRisk-AI/
|
| 35 |
+
│
|
| 36 |
+
├── README.md # Project Overview
|
| 37 |
+
├── requirements.txt # Dependencies
|
| 38 |
+
├── .gitignore
|
| 39 |
+
│
|
| 40 |
+
├── data/ # Raw and Processed Data
|
| 41 |
+
│ ├── raw/
|
| 42 |
+
│ │ ├── train.csv
|
| 43 |
+
│ │ └── test.csv
|
| 44 |
+
│ └── processed/
|
| 45 |
+
│ ├── train_processed.csv
|
| 46 |
+
│ └── test_processed.csv
|
| 47 |
+
│
|
| 48 |
+
├── docs/ # Detailed Documentation
|
| 49 |
+
│ ├── 00_setup.md
|
| 50 |
+
│ ├── 01_data_overview.md
|
| 51 |
+
│ ├── 02_baseline.md
|
| 52 |
+
│ ├── 03_feature_engineering.md
|
| 53 |
+
│ ├── 04_model_optimization.md
|
| 54 |
+
│ └── 05_evaluation_report.md
|
| 55 |
+
│
|
| 56 |
+
├── notebooks/ # Jupyter Notebooks (EDA -> Pipeline)
|
| 57 |
+
│ ├── Analysis/
|
| 58 |
+
│ │ └── 00_Data_Preparation_Training.ipynb
|
| 59 |
+
│ └── Modeling/
|
| 60 |
+
│ ├── 01_EDA.ipynb
|
| 61 |
+
│ ├── 02_baseline_model.ipynb
|
| 62 |
+
│ ├── 03_feature_engineering.ipynb
|
| 63 |
+
│ ├── 04_model_optimization.ipynb
|
| 64 |
+
│ └── 05_model_evaluation.ipynb
|
| 65 |
+
│
|
| 66 |
+
│
|
| 67 |
+
├── src/ # Source Code
|
| 68 |
+
│ ├── templates/ #UI
|
| 69 |
+
│ │ └── index.html
|
| 70 |
+
│ ├── models/ # Saved Artifacts
|
| 71 |
+
│ │ ├── final_model.pkl
|
| 72 |
+
│ │ └── features.json
|
| 73 |
+
│ └── tests/
|
| 74 |
+
│ ├── app.py # App
|
| 75 |
+
│ ├── config.py # Configuration
|
| 76 |
+
│ ├── inference.py # Prediction Logic
|
| 77 |
+
│ └── pipeline.py # Training Pipeline
|
| 78 |
+
│
|
| 79 |
+
└── OIG2.png
|
| 80 |
+
```
|
| 81 |
+
<img width="1862" height="853" alt="image" src="https://github.com/user-attachments/assets/0e259956-69d9-4c82-99d3-0ad0fbb619a3" />
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
## 📌 To-Do: Business & Model Improvements
|
| 85 |
+
|
| 86 |
+
- [ ] Validate the final model on a separate holdout test set
|
| 87 |
+
- [ ] Set up model monitoring (monthly accuracy, drift in key features)
|
| 88 |
+
- [ ] Define decision thresholds for each credit score class
|
| 89 |
+
- [ ] Add fallback rules for uncertain predictions (e.g., probability < 55%)
|
| 90 |
+
- [ ] Build a feedback loop to compare predicted vs actual scores
|
| 91 |
+
- [ ] Document model limitations and train credit team on edge cases
|
| 92 |
+
|
| 93 |
+
## Contact
|
| 94 |
+
* **Author**: Rana Irem Turhan
|
| 95 |
+
* **GitHub**: github.com/Rana-Irem-Turhan
|
| 96 |
+
* **LinkedIn**: https://www.linkedin.com/in/irem-turhan/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|