How shikhar24singh/employee-attrition-prediction-dashboard works
This is an employee-attrition prediction dashboard backed by a Random Forest pipeline. The main workflow lets an HR user select a held-out employee, adjust overtime and income, and view an updated attrition probability and profile; a separate insights tab shows a confusion matrix and feature drivers. Offline, training loads and splits the source data, preprocesses features, applies SMOTE, and saves the model and test data; evaluation reports metrics and generates the matrix. The graph follows the shown calls and documented capabilities; unsampled runtime details are not inferred.
Main entry points: models Model and plots · train.py Training pipeline · app.py Streamlit dashboard · evaluate.py Model evaluation
Components 11
HR dashboard
- Streamlit dashboard
app.py - Employee simulator
app.py - Risk and profile view
app.py - Model insights
app.py
Model training
- Feature preprocessing
src/preprocess.py - Training pipeline
src/train.py
Model evaluation
- Model evaluation
src/evaluate.py
Data and artifacts
- HR analytics CSV
data/HR_Analytics.csv - Held-out test data
data - Model and plots
models
Other components
- HR manager
Connections 16
- HR manager → Streamlit dashboard: uses
README.md - Streamlit dashboard → Employee simulator: shows
app.py - Employee simulator → Held-out test data: loads sample
app.py - Employee simulator → Risk and profile view: updates inputs
app.py - Streamlit dashboard → Model and plots: loads model
app.py - Risk and profile view → Model and plots: predicts with
app.py - Streamlit dashboard → Model insights: shows insights
app.py - Model insights → Model and plots: reads matrix
app.py - Model insights → Model and plots: extracts importance
app.py - Training pipeline → HR analytics CSV: loads and splits
src/train.py - Training pipeline → Feature preprocessing: builds pipeline
src/train.py - Training pipeline → Model and plots: saves model
src/train.py - Training pipeline → Held-out test data: saves split
src/train.py - Model evaluation → Model and plots: loads model
src/evaluate.py - Model evaluation → Held-out test data: loads test data
src/evaluate.py - Model evaluation → Model and plots: saves matrix
src/evaluate.py