|
Download README.md from EnYa32/EmployeeAttritionClassification: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/spaces/EnYa32/EmployeeAttritionClassification/resolve/main/README.md
- Command line
-
hf download hf://spaces/EnYa32/EmployeeAttritionClassification/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnYa32/EmployeeAttritionClassification/resolve/main/README.md
1.42 kB
| title: EmployeeAttritionClassification | |
| emoji: 🏢 | |
| colorFrom: indigo | |
| colorTo: blue | |
| sdk: docker | |
| app_port: 8501 | |
| tags: | |
| - streamlit | |
| pinned: false | |
| short_description: Employee Attrition Predictor using XGBoost. | |
| license: mit | |
| ## Overview | |
| This app predicts the **probability of employee attrition (Attrition = 1)** using a trained **XGBoost classifier**. | |
| The model was evaluated using **ROC-AUC** and achieved strong validation performance. | |
| ## Files in this repo | |
| Place these files in the **repo root (same folder as `app.py`)**: | |
| - `xgb_model.pkl` — trained XGBoost model | |
| - `feature_names.pkl` — list of training feature columns (order matters) | |
| - `threshold.pkl` — decision threshold (e.g., 0.35) | |
| ## How to use the app | |
| ### 1) Single prediction (form) | |
| - Enter numeric/ordinal feature values | |
| - Select one option for categorical groups (one-hot) | |
| - The app outputs: | |
| - `Attrition probability` | |
| - `Attrition prediction` using your saved threshold | |
| ### 2) Batch prediction (CSV upload) | |
| Upload a CSV that is already in the **same feature format** as your training data | |
| (after preprocessing and one-hot encoding). | |
| The app will align columns automatically using `feature_names.pkl`. | |
| ## Notes | |
| - Kaggle submissions typically require **probabilities**, not class labels. | |
| - If you want to change the decision threshold, update `threshold.pkl`. | |
| ## Local run | |
| ```bash | |
| pip install -r requirements.txt | |
| streamlit run app.py |