Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 🚀
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: src/app.py
|
| 8 |
sdk_version: 1.54.0
|
|
@@ -10,97 +10,72 @@ pinned: false
|
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
| 16 |
-
The project covers the full pipeline from data analysis to model deployment readiness.
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
## 📌 Project Overview
|
| 21 |
-
|
| 22 |
-
The goal of this project is to predict whether a customer will leave the bank (`Exited = 1`) based on
|
| 23 |
-
demographic, financial, and behavioral features.
|
| 24 |
|
| 25 |
-
|
| 26 |
-
- Robust feature engineering
|
| 27 |
-
- Model comparison using multiple algorithms
|
| 28 |
-
- ROC-AUC–based evaluation for imbalanced data
|
| 29 |
-
- Cross-validation and hyperparameter tuning
|
| 30 |
-
- Saving the final model for inference and deployment
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
-
##
|
| 35 |
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
-
##
|
| 45 |
|
| 46 |
-
|
| 47 |
-
- Balance usage indicator (`HasBalance`)
|
| 48 |
-
- Balance per product ratio
|
| 49 |
-
- Age and credit score segmentation
|
| 50 |
-
- Activity × product interaction score
|
| 51 |
-
- Tenure and salary-based ratios
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
-
##
|
| 58 |
-
|
| 59 |
-
The following models were evaluated:
|
| 60 |
-
|
| 61 |
-
- Logistic Regression
|
| 62 |
-
- Decision Tree
|
| 63 |
-
- Random Forest
|
| 64 |
-
- Gradient Boosting
|
| 65 |
-
- AdaBoost
|
| 66 |
-
- LightGBM
|
| 67 |
-
- XGBoost
|
| 68 |
-
- CatBoost
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
---
|
| 73 |
|
| 74 |
-
##
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
| CatBoost | 0.8898 |
|
| 79 |
-
| LightGBM | 0.8896 |
|
| 80 |
-
| XGBoost | 0.8893 |
|
| 81 |
-
| Gradient Boosting | 0.8881 |
|
| 82 |
-
| AdaBoost | 0.8767 |
|
| 83 |
-
| Random Forest | 0.8750 |
|
| 84 |
-
| Logistic Regression | 0.8180 |
|
| 85 |
|
| 86 |
---
|
| 87 |
|
| 88 |
-
##
|
| 89 |
|
| 90 |
-
|
| 91 |
-
- **RandomizedSearchCV** for hyperparameter tuning
|
| 92 |
-
- Class imbalance handled using class weights
|
| 93 |
-
- Final model trained with optimal hyperparameters
|
| 94 |
|
| 95 |
---
|
| 96 |
|
| 97 |
-
##
|
| 98 |
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
- Streamlit
|
| 101 |
-
- Hugging Face Spaces
|
| 102 |
-
- Any Python-based backend
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: 🐎 Horse Health Outcome Prediction App
|
| 3 |
emoji: 🚀
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: src/app.py
|
| 8 |
sdk_version: 1.54.0
|
|
|
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# 🐎 Horse Health Outcome Prediction
|
| 14 |
|
| 15 |
+
Machine Learning project based on Kaggle Playground Series (S3E22).
|
|
|
|
| 16 |
|
| 17 |
+
## 📌 Problem
|
| 18 |
+
Predict horse health outcomes using medical indicators.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
Evaluation Metric: **Micro F1 Score**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
+
## 🧠 Project Workflow
|
| 25 |
|
| 26 |
+
- Data Cleaning
|
| 27 |
+
- Missing Value Handling
|
| 28 |
+
- Feature Engineering
|
| 29 |
+
- Model Comparison
|
| 30 |
+
- Hyperparameter Tuning (LightGBM)
|
| 31 |
+
- Feature Importance Analysis
|
| 32 |
+
- Model Deployment Ready
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
+
## 🏆 Best Model
|
| 37 |
|
| 38 |
+
**LightGBM Classifier**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
Optimized using RandomizedSearchCV.
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
+
## 📊 Model Performance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
| Metric | Score |
|
| 47 |
+
|--------|-------|
|
| 48 |
+
| Micro F1 | ~0.70+ |
|
| 49 |
+
| ROC-AUC (OVR) | ~0.84 |
|
| 50 |
|
| 51 |
---
|
| 52 |
|
| 53 |
+
## 💾 Saved Artifacts
|
| 54 |
|
| 55 |
+
- `final_model.pkl` → trained model
|
| 56 |
+
- `model_features.pkl` → feature list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
---
|
| 59 |
|
| 60 |
+
## 🚀 Deployment
|
| 61 |
|
| 62 |
+
The model is deployed using **Streamlit (HuggingFace Spaces ready)**.
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
---
|
| 65 |
|
| 66 |
+
## 📦 Tech Stack
|
| 67 |
|
| 68 |
+
- Python
|
| 69 |
+
- Pandas
|
| 70 |
+
- Scikit-learn
|
| 71 |
+
- LightGBM
|
| 72 |
+
- XGBoost
|
| 73 |
+
- CatBoost
|
| 74 |
- Streamlit
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## 📖 Citation
|
| 79 |
+
|
| 80 |
+
Kaggle Playground Series - S3E22
|
| 81 |
+
Predict Health Outcomes of Horses
|