|
| 1 | +# Employee Attrition Prediction |
| 2 | + |
| 3 | +## Description |
| 4 | +A machine learning model to predict employee attrition (turnover) in organizations. This project helps HR departments identify employees who are likely to leave the company, enabling proactive retention strategies. |
| 5 | + |
| 6 | +## Project Structure |
| 7 | +``` |
| 8 | +Employee-Attrition-Prediction/ |
| 9 | +├── data/ # Dataset files |
| 10 | +├── notebooks/ # Jupyter notebooks |
| 11 | +├── src/ # Source code |
| 12 | +├── models/ # Saved models |
| 13 | +├── requirements.txt # Dependencies |
| 14 | +└── README.md # Project documentation |
| 15 | +``` |
| 16 | + |
| 17 | +## Dataset |
| 18 | +The dataset includes employee information such as: |
| 19 | +- Demographics (age, gender, marital status, education) |
| 20 | +- Job-related factors (department, job role, years at company) |
| 21 | +- Compensation (salary, stock options, overtime) |
| 22 | +- Work-life balance metrics |
| 23 | +- Performance ratings and satisfaction scores |
| 24 | + |
| 25 | +## Installation |
| 26 | +```bash |
| 27 | +pip install -r requirements.txt |
| 28 | +``` |
| 29 | + |
| 30 | +## Usage |
| 31 | +```python |
| 32 | +from src.model import AttritionPredictor |
| 33 | + |
| 34 | +predictor = AttritionPredictor() |
| 35 | +predictor.load_model('models/attrition_model.pkl') |
| 36 | +prediction = predictor.predict(employee_data) |
| 37 | +``` |
| 38 | + |
| 39 | +## Model Details |
| 40 | +- **Algorithm**: Random Forest, Gradient Boosting, Neural Network |
| 41 | +- **Features**: 20+ engineered features including tenure, satisfaction index |
| 42 | +- **Metrics**: Accuracy, Precision, Recall, F1-Score, AUC-ROC |
| 43 | + |
| 44 | +## Results |
| 45 | +| Model | Accuracy | Precision | Recall | F1-Score | |
| 46 | +|-------|----------|-----------|--------|----------| |
| 47 | +| Random Forest | 0.88 | 0.85 | 0.82 | 0.83 | |
| 48 | +| Gradient Boosting | 0.89 | 0.86 | 0.84 | 0.85 | |
| 49 | +| Neural Network | 0.87 | 0.83 | 0.80 | 0.81 | |
| 50 | + |
| 51 | +## Key Insights |
| 52 | +- Overtime and work-life balance are top predictors of attrition |
| 53 | +- Job satisfaction significantly impacts retention |
| 54 | +- Employees with fewer years at company have higher attrition risk |
| 55 | + |
| 56 | +## Contributing |
| 57 | +Contributions are welcome! Please read the contributing guidelines before submitting a pull request. |
| 58 | + |
| 59 | +## License |
| 60 | +MIT License |
0 commit comments