Attrition by overtime
Which operational condition has the clearest gap?
Why do employees leave, and which factors actually predict it? This case turns the IBM HR Analytics dataset into a retention question a team can investigate.
For a tool that flags potential leavers, recall on the leaver class matters more than a better-looking overall accuracy score.
Use the filters to inspect the original sample by department and overtime status. Rates recalculate within the selected view.
Which operational condition has the clearest gap?
Which roles need rate-based attention rather than raw-count attention?
Does risk concentrate in the early-career window?
Recall is the decision metric when the goal is to catch actual leavers.
Rates are more useful than raw departures when role sizes differ.
The original write-up intentionally separates descriptive EDA from model performance and avoids pretending that a small HR sample proves causation.
The original CSV gives 30.5% attrition among overtime employees versus 10.4% without overtime. The PDF recommends treating overtime as the primary retention lever.
The PDF reports median tenure of 3 years for leavers versus 6 years for stayers. That points toward targeted 0–3 year retention work rather than a broad company-wide intervention.
Random Forest reaches 86% accuracy but 21% recall; Logistic Regression reaches 72% accuracy but 56% recall. For identifying actual leavers, the lower-accuracy model is more useful.
The data supports a practical sequence, not a definitive causal story.
Original `HR_Employee_Attrition.csv`: 1,470 employees and 35 source features covering demographics, compensation, satisfaction, and tenure.
Removed constant columns, checked nulls and duplicates, mapped the target, compared attrition rates by role/overtime/tenure, and used balanced Logistic Regression and Random Forest models.
Python · pandas · NumPy · Matplotlib · Seaborn · scikit-learn. The displayed population rates are recalculated from the original repository CSV.
Attrition rates and feature importance show observed association within this sample. The original PDF notes that exit-interview text, manager notes, and engagement-survey data would be needed to explain why employees leave.