Skip to content

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Employee Attrition Prediction using Random Forest

๐Ÿ“Œ Problem Statement

The goal of this project is to predict employee attrition in a firm using machine learning. Early detection of potential attrition helps HR teams plan manpower requirements and improve employee retention strategies.


๐Ÿ“Š Dataset

  • Dataset: Contains employee records with demographic, job-related, and performance features.
  • Samples: 1471
  • Features: Attrition and 34 more features0
  • Target:
    • 1 โ†’ Employee will leave (attrition)
    • 0 โ†’ Employee will stay

โš™๏ธ Approach

  1. Data Preprocessing
  • Handled categorical variables using Label Encoding
  • Cleaned and prepared dataset for training
  1. Model Training
  • Algorithm: RandomForestClassifier
  • Performed train-test split to evaluate model performance
  1. Evaluation
  • Accuracy
  • Precision
  • Recall
  • F1-score

๐Ÿš€ Results

  • Accuracy: ~87% on test set
  • The Random Forest model showed strong predictive performance with good accuracy.
  • Results demonstrate the usefulness of machine learning for HR decision support.

๐Ÿ’ป How to Run

  1. Clone repository:
git clone https://github.com/your-username/Employee-Attrition-RF.git
cd Employee-Attrition-RF
  1. Install dependencies:
pip install -r requirements.txt
  1. Run Jupyter Notebook:
jupyter notebook Employee Attrition Prediction.ipynb

๐Ÿ”ฎ Future Work

  • Apply GridSearchCV for hyperparameter tuning
  • Use SMOTE or other balancing techniques for imbalanced data
  • Try other classifiers (Logistic Regression, XGBoost) for comparison
  • Build a Streamlit web app for interactive predictions

๐Ÿ“œ License

MIT License

About

Employee Attrition refers to the gradual reduction in the workforce of an organization due to various factors such as voluntary resignation, retirement, or involuntary termination (e.g., layoffs). It is an important metric for businesses to monitor as it can provide insights into employee satisfaction, and the effectiveness of retention strategies.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages