An An Explainable Machine Learning Approach Using Random Forest and SHAP for Employee Attrition Prediction - Ipmawati, Joang; Kusnawi, Kusnawi (Komunitas Dosen Indonesia, 2026)
Understanding and predicting employee attrition is a strategic challenge for modern organizations because high turnover rates impact operational costs, productivity, and the loss of valuable company knowledge. Conventional statistical approaches, such as logistic regression, have limitations in capturing complex and non-linear relationships between workforce variables. This study proposes an Explainable Machine Learning approach by integrating the Random Forest algorithm and the SHAP (SHapley Additive Explanations) method to predict and interpret employee attrition behavior more transparently. However, existing HR analytics research rarely combines tree-based ensemble models with robust explainability, creating a gap in developing accurate yet interpretable solutions.The dataset used is HR-employee-attrition, with 1,470 entries and 35 features covering demographics, compensation, and job satisfaction. After preprocessing and parameter optimization, the Random Forest model achieved 83% accuracy, an ROC-AUC of 0.789, and a PR-AUC of 0.414. Model performance was validated through a 70:30 stratified split supported by cross-validation to ensure predictive consistency, indicating good classification performance despite class imbalance. SHAP analysis identified five key features influencing attrition: OverTime, MonthlyIncome, Age, YearsAtCompany, and JobSatisfaction. Unlike conventional black-box models, the proposed approach provides global and local explanations that clarify the contribution of each feature to individual predictions. Practically, these insights enable HR departments to identify high-risk employees earlier and design targeted retention interventions based on data-driven evidence.The findings demonstrate that integrating Random Forest with SHAP produces models that are both accurate and interpretable. Future research may explore integrating SHAP explanations into interactive HR decision-support systems and evaluating more advanced explainable deep learning methods.