An HR analytics platform that predicts employee attrition with lead time for intervention and identifies flight risk factors.
The Streamlit app (dashboard.py) reads pickled models and preprocessed data from an artifacts/ directory. That directory is generated by the final cell of project-08.ipynb and is git-ignored.
-
Install dependencies (Python 3.11+ recommended):
pip install -r requirements.txt
On macOS, XGBoost needs
libomp:brew install libomp
-
Generate the artifacts — open
project-08.ipynband run all cells to the end. The last cell (Part 6: Export Artifacts for Dashboard) writes about a dozen files into./artifacts/. -
Launch the dashboard from the repo root:
streamlit run dashboard.py
The app opens at http://localhost:8501 with four tabs:
- Overview — headline attrition stats, department/role breakdowns, and LASSO Logistic Regression test metrics.
- Risk Explorer — per-employee Cox survival forecast + SHAP explanation.
- Survival Curves — Kaplan-Meier comparisons with log-rank significance.
- Fairness Audit — parity, calibration, and C-index gaps across protected groups.
Re-run the notebook's export cell any time the models change — the dashboard will pick up the new artifacts on the next reload (R in the Streamlit UI).