Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
title: EmployeeAttritionClassification
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
@@ -12,9 +12,35 @@ short_description: Employee Attrition Predictor using XGBoost.
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: EmployeeAttritionClassification
|
| 3 |
+
emoji: 🏢
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
+
## Overview
|
| 16 |
+
This app predicts the **probability of employee attrition (Attrition = 1)** using a trained **XGBoost classifier**.
|
| 17 |
+
The model was evaluated using **ROC-AUC** and achieved strong validation performance.
|
| 18 |
|
| 19 |
+
## Files in this repo
|
| 20 |
+
Place these files in the **repo root (same folder as `app.py`)**:
|
| 21 |
|
| 22 |
+
- `xgb_model.pkl` — trained XGBoost model
|
| 23 |
+
- `feature_names.pkl` — list of training feature columns (order matters)
|
| 24 |
+
- `threshold.pkl` — decision threshold (e.g., 0.35)
|
| 25 |
+
|
| 26 |
+
## How to use the app
|
| 27 |
+
### 1) Single prediction (form)
|
| 28 |
+
- Enter numeric/ordinal feature values
|
| 29 |
+
- Select one option for categorical groups (one-hot)
|
| 30 |
+
- The app outputs:
|
| 31 |
+
- `Attrition probability`
|
| 32 |
+
- `Attrition prediction` using your saved threshold
|
| 33 |
+
|
| 34 |
+
### 2) Batch prediction (CSV upload)
|
| 35 |
+
Upload a CSV that is already in the **same feature format** as your training data
|
| 36 |
+
(after preprocessing and one-hot encoding).
|
| 37 |
+
The app will align columns automatically using `feature_names.pkl`.
|
| 38 |
+
|
| 39 |
+
## Notes
|
| 40 |
+
- Kaggle submissions typically require **probabilities**, not class labels.
|
| 41 |
+
- If you want to change the decision threshold, update `threshold.pkl`.
|
| 42 |
+
|
| 43 |
+
## Local run
|
| 44 |
+
```bash
|
| 45 |
+
pip install -r requirements.txt
|
| 46 |
+
streamlit run app.py
|