This project analyzes the IBM HR Analytics Employee Attrition & Performance dataset and builds multiple machine learning models to predict whether an employee is likely to leave the company. It includes data preprocessing, outlier handling, feature engineering, scaling, ML model comparison, and a Tableau dashboard for visualization.
- Source: Kaggle – IBM HR Analytics Employee Attrition
- Rows: 1470
- Columns: 35
- Target Variable:
Attrition(Yes/No)
- Inspected data types, null values, summary statistics
- Removed constant columns (
Over18,EmployeeCount,StandardHours) - Visualized distributions using boxplots and summary charts
Applied IQR (Interquartile Range) method to detect and remove outliers across all numeric columns, resulting in a clean dataset suitable for modeling.
Converted categorical attributes into numeric codes:
Encoded using LabelEncoder Examples:
AttritionGenderOverTime
Fields like BusinessTravel, JobRole, Department, etc., mapped to numerical values.
Used Min-Max Scaling to normalize all numeric columns into a 0–1 range.
Exported final dataset as df_min_max.csv.
Created interactive charts and dashboards to visualize:
- Employee demographics
- Gender balance
- Department vs role distributions
- Monthly income patterns
- Attrition insights
- Heatmaps for multi-category patterns
Selected top-correlated features (>0.1 correlation with target).
80% training, 20% testing.
- Logistic Regression
- Random Forest
- SVM
- Decision Tree
- KNN
Each evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- Confusion Matrix
Compared all models visually via bar chart.

- Clear model comparison
- Visual confusion matrices
- Random Forest generally performs strongest
- Identified dominant attrition factors such as overtime, satisfaction levels, income, and tenure
This project delivers:
- A complete preprocessing and ML pipeline
- Feature encoding/scaling automation
- Multi-model evaluation
- HR analytics dashboard
- Practical insights to reduce employee attrition
- Clone repo
- Install dependencies
- Run notebooks
- View Tableau dashboard