← Workforce Attrition Analytics

Model · People Analytics

Class-weighted logistic regression, chosen over a random forest

DatasetIBM HR Analytics Employee Attrition (Kaggle)
Employees1,470 · 16.1% attrition
Split80/20 stratified · 294 held out

Both a class-weighted logistic regression and a random forest were trained on the same 80/20 stratified split, which kept the dataset's 16.1% attrition rate consistent in both the training data and the 294 held-out test employees. Logistic regression is the model we shipped — it's explainable to HR without a data science background, and it catches more of the people who actually leave.

AUC 0.798

Ranks at-risk employees well above chance

Recall 61.7%

Share of actual leavers correctly flagged — the metric we optimized for

Accuracy 75.2%

Below the 84% "everyone stays" baseline — expected, and the right trade

Precision 34.5%

About 1 in 3 flags is a real leaver

Random forest scored higher on raw accuracy (83.3%) but recalled only 38.3% of leavers — it would have missed 6 in 10 people who actually left. Logistic regression trades some accuracy for the ability to actually catch them, and its coefficients are simple enough to explain to HR in a sentence, not a black box.