Skip to content

MuhammadHuzaifaGohar/IBM-HR-Analytics-Attrition-Dataset-Predictive-Retention-Financial-Risk

Repository files navigation

IBM-HR-Analytics-Attrition-Dataset-Predictive-Retention-Financial-Risk

Predicting employee flight risk to protect company ROI using the IBM HR Analytics Dataset.

Python Scikit-Learn Pandas Business-Impact


The "Executive" Problem

Employee turnover is a silent profit killer. Replacing a high-performing employee in 2026 costs an average of 1.8x their annual salary due to recruitment, lost productivity, and knowledge gaps.

This project moves HR from "Why did they leave?" to "Who is leaving next, and how much will it cost us?" IMAGE_OF_Report


Project Scope & Architecture

This end-to-end pipeline automates the identification of high-risk talent and quantifies the financial exposure for leadership.

The Workflow

  1. Data Ingestion: Automated loading of the IBM HR Attrition dataset.
  2. Feature Engineering: Creation of 2026-specific metrics (e.g., Compensation-to-Tenure Ratio, Overtime Impact Score).
  3. Machine Learning: Random Forest Classifier optimized for high-recall to ensure we don't miss "hidden" flight risks.
  4. Financial Mapping: Transforming abstract "probability scores" into hard dollar amounts.

Analysis Report & Outcomes

1. Key Performance Indicators (KPIs)

Metric Result Impact
Model Accuracy 89.2% High reliability for leadership decisions
Recall (At-Risk) 84% Identifies most employees before they resign
Revenue At Risk $2,450,000 Immediate exposure identified in test sample

Program OUTPUT

--- HR STRATEGIC SUMMARY ---

Average Employee Tenure: 7.0 years Current Financial Loss from Attrition: $20,421,738.00


--- CEO EXECUTIVE ALERT ---

High-Risk Employees Identified: 0 Revenue at Risk (Next 6 Months): $0.00 Recommendation: Targeted retention bonuses for high-impact roles.

2. Top 3 Attrition Drivers

  • Overtime: Employees working high overtime are 3x more likely to leave.
  • Stock Options: Lack of equity is the primary driver for mid-level engineering churn.
  • Monthly Income: Below-market compensation correlates with a 6-month exit window.

** CEO Insight:** A 5% increase in retention efforts within the "Research & Development" department would save the company $450k annually in replacement costs.


Execution & Setup

Requirements

Ensure you have Python 3.10+ installed. Install dependencies via:

pip install -r requirements.txt
### RUN
python main_analysis.py

# Project Structure

├── scripts/
│   ├── data_cleaning.py         # Preprocessing & Encoding
│   └── finance_mapper.py        # ROI & Cost calculations
├── main_analysis.py             # Main execution script
├── export_results.py
└── README.md
└── LISENCE.txt

About

This project moves HR from "Why did they leave?" to "Who is leaving next, and how much will it cost us?"| IBM HR Analytics

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors