Skip to content

EODavis/employee-Attrition-sniffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

employee-Attrition-sniffle

Predict Employee Attrition and Retention with Machine Learning

This app helps organisations predict the likelihood of employee attrition based on key features such as job role, age, income, and more. Built using machine learning, this tool empowers HR teams to proactively identify employees at risk of leaving and take timely action to improve retention.

Project Overview

Employee attrition (turnover) is a significant challenge for HR departments. By predicting which employees are at risk of leaving, companies can focus on improving retention strategies, reducing recruitment costs, and maintaining a stable workforce. This application uses a Random Forest Classifier to predict attrition with high accuracy, based on historical employee data.

Key Features

Predict Employee Attrition: Given various employee attributes, the app will predict the likelihood of an employee leaving.

Data Preprocessing: Handles missing data, categorical variables, and scales numerical features for optimal model performance.

Interactive Dashboard: Easily input employee data for real-time predictions with an intuitive user interface.

Model Explanation: Understand the model's prediction through feature importance and detailed feedback on why an employee might leave.

Technologies Used

Streamlit: For the interactive web app interface.

Pandas & NumPy: Data manipulation and analysis.

Scikit-learn: Model training, evaluation, and scaling.

Matplotlib: Data visualisation for insights and model performance.

Random Forest Classifier: The ML model used for prediction.

Pickle: Model serialisation for easy deployment and reuse.

How It Works

Upload Your Dataset: Start by uploading your company’s employee data. The app will automatically preprocess it (handle missing values, scale features, and encode categorical variables).

Model Training: The app uses a trained Random Forest model to predict whether an employee is likely to leave or stay.

Real-time Prediction: Input new employee data, and get predictions instantly.

Actionable Insights: View feature importance to identify factors driving employee attrition and make data-backed decisions.

Installation & Setup

To get started, clone the repository and install the necessary dependencies.

Clone the repository:

bash: git clone https://github.com/your-username/attrition-prediction-app.git cd attrition-prediction-app

Create a virtual environment (recommended):

bash: python -m venv venv source venv/bin/activate # On Windows use venv\Scripts\activate

Install dependencies:

bash: pip install -r requirements.txt Run the app:

bash: streamlit run app.py

Usage

  1. Once the app is running, open your browser and go to http://localhost:8501 to interact with the app.

  2. Upload your employee dataset or enter new employee data for predictions.

  3. View predictions along with insights about the most important features driving employee attrition.

Contributing

Contributions are welcome! Feel free to fork this repository, submit issues, or send pull requests. You can help by:

Fixing bugs.

Enhancing features (e.g., adding more predictive models or metrics).

Improving the documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

📈 Explore. Predict. Retain.

This Attrition Prediction App is designed to provide actionable insights into employee retention. By harnessing the power of machine learning, you can predict potential attrition risks and take proactive steps to retain top talent.

About

This Attrition Prediction App uses machine learning to predict employee turnover based on key features like age, income, and job role. With an intuitive interface, it helps HR teams identify at-risk employees and make data-driven decisions to improve retention and reduce turnover costs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors