Employee Attrition Prediction using XGBoost and Flask with SHAP-based Feature Insights
Employee Attrition Prediction using XGBoost and Flask with SHAP-based Feature Insights
This project focuses on predicting employee attrition — identifying whether an employee is likely to leave the organization — using XGBoost, a high-performance gradient boosting algorithm. The model is trained on an HR dataset and incorporates advanced feature selection to highlight the top factors influencing attrition. Key steps include data preprocessing, encoding categorical variables, feature importance extraction, and model training using XGBoost. The project emphasizes explainability through SHAP (SHapley Additive exPlanations) values, which visualize and rank the top 10 features impacting employee turnover, such as OverTime, JobLevel, MaritalStatus, and TotalWorkingYears. To make it interactive, the prediction system is deployed using Flask, allowing users to input employee details (such as job level, income, overtime status, etc.) and instantly receive an attrition prediction. The app also displays visual insights derived from SHAP, helping HR managers understand why a particular prediction was made. Tech Stack: Python, Flask, XGBoost, SHAP, Pandas, Scikit-learn, HTML/CSS Key Features: ML-based employee attrition prediction SHAP visual explanation for top 10 contributing factors Flask web interface for live predictions Clean, modular code structure for scalability This project demonstrates a complete data science pipeline — from data analysis and feature engineering to model deployment and visualization, aligning with real-world HR analytics use cases.
Miriyala Veera Ganesh
student
Project Overview
Project Claps
No claps yet. Be the first to clap for this project!
Project Images
Discussion
Please log in to join the discussion.