Classified: At-Risk

A Machine Learning Model for Employee Turnover

Employee turnover is costly, disruptive, and often preventable. This project builds a recall-focused machine learning model to help HR teams identify at-risk employees early, before burnout or disengagement leads to resignation.


Project Links

Executive Summary & Model Walkthrough

Python Exploratory Data Analysis

Model Construction & Validation

GitHub Repository


Think of this project as a user’s guide to the cranky crystal ball of machine learning. I used it to put my understanding of applied ML to the test: tuning models to catch as many at-risk employees as possible, weighing false alarms against missed warning signs, and turning uncertain predictions into clear recommendations HR could use. The report is mostly tech-heavy, but includes a guided, layperson-friendly section right after the Executive Summary—part intro to machine learning, part personal field journal—for those curious how the magic (i.e., math) happens.

Project Overview

Why do employees leave, and can data help an organization intervene earlier? For this capstone to the Google Advanced Data Analytics Certificate, I analyzed employee attrition data for the fictional Salifort Motors, combining exploratory data analysis with predictive modeling to identify patterns associated with turnover and inform potential retention strategies.

The exploratory analysis revealed two prominent groups of employees who left: overworked employees logging exceptionally long hours across multiple projects, and underutilized employees with fewer projects and low-to-moderate satisfaction. Attrition was also concentrated around the three-to-four-year tenure mark, while promotions were rare. Together, these patterns suggest that both burnout and disengagement may be associated with limited opportunities for advancement.

I compared Logistic Regression, Decision Tree, Random Forest, and XGBoost models, prioritizing recall to reduce the number of departing employees missed by the model. XGBoost achieved 96.7% accuracy, 94.0% recall, and 87.2% precision on the held-out test set. It identified most employees who left while producing fewer false positives than the other models—a useful trade-off for a hypothetical early-warning system.

To investigate the predictions, I used feature importance, SHAP values, and interpretable models to examine how satisfaction, tenure, workload, and project assignments related to predicted attrition. The resulting recommendations focus on sustainable workloads, career development, recognition, and supportive HR outreach. The project combines data exploration, model evaluation, and explainability to translate predictive results into practical questions an organization could investigate before implementing retention interventions.


Gallery



SHAP summary dot plot showing how each feature impacts XGBoost churn predictions, with satisfaction and time spent emerging as the strongest drivers. SHAP summary plot: Highlighting which features most strongly increase predicted churn risk. Used to surface actionable burnout and disengagement signals.

Scatterplot comparing employee satisfaction and average monthly hours, forming two main clusters: overworked dissatisfied leavers, and low-work disengaged employees. Satisfaction vs. Average Monthly Hours: Two main clusters emerge—overworked, dissatisfied leavers and underutilized, disengaged employees.

Decision tree diagram illustrating churn predictions based on satisfaction, tenure, and workload thresholds. Decision Tree: A step-by-step breakdown of how key features like satisfaction, tenure, and workload drive attrition predictions.

Side-by-side confusion matrices displaying how multiple models classified employees who stayed versus those who left. Confusion Matrices: Comparing model performance in correctly identifying employees who stayed or left.

Histogram showing the predicted churn probabilities for misclassified employees, highlighting low and uncertain confidence ranges. Predicted Probabilities: Distribution of model confidence for cases it misclassified, highlighting areas of uncertainty.

Bar chart ranking features by model importance, with satisfaction, tenure, and workload as top predictors of employee attrition. Feature Importances: Ranking the most influential factors driving employee attrition in the final model.

References

Original dataset available on Kaggle. The data has been repurposed and adapted for this project as part of the Google Advanced Data Analytics Certificate.