Skip to content

An HR analytics project that predicts employee attrition using Logistic Regression, with performance evaluation based on accuracy, precision, recall, and F1-score.

Notifications You must be signed in to change notification settings

prathams0ni/Employee_Attrition_Prediction_Using_Logistic_Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Employee Attrition Prediction Using Logistic Regression

πŸ“Œ Project Overview

This project focuses on HR Analytics and implements a Logistic Regression classification model to predict employee attrition. The goal is to help organizations understand workforce trends and identify employees who are at risk of leaving.


🎯 Problem Statement

Employee attrition leads to increased hiring costs and productivity loss.
Using historical HR data, this project aims to:

  • Predict whether an employee will leave the organization
  • Identify important factors influencing attrition
  • Evaluate model performance using classification metrics

πŸ“‚ Dataset Details

  • File Name: HR_file.csv
  • Target Variable: Attrition (Binary: Yes / No)

The dataset includes employee attributes related to:

  • Personal demographics
  • Job role and department
  • Compensation and performance
  • Work-life balance indicators

πŸ› οΈ Tech Stack

  • Language: Python
  • Libraries Used:
    • pandas
    • numpy
    • matplotlib / seaborn
    • scikit-learn
  • Environment: Jupyter Notebook

πŸ” Methodology

1. Data Preprocessing

  • Handled missing values
  • Encoded categorical variables
  • Scaled numerical features

2. Exploratory Data Analysis

  • Analyzed attrition distribution
  • Identified key trends influencing employee turnover

3. Model Building

  • Implemented Logistic Regression
  • Split data into training and testing sets
  • Trained model on training data

4. Model Evaluation

  • Accuracy
  • Precision
  • Recall
  • F1-score
  • Confusion Matrix

πŸ“Š Key Results & Insights

  • Model achieved approximately 98% accuracy
  • High precision and recall for both classes
  • Minimal false predictions
  • Logistic Regression proved effective and interpretable

πŸ“ˆ Final Conclusion

The Logistic Regression model successfully predicts employee attrition with high accuracy and balanced classification performance. The model can support HR teams in proactive decision-making and employee retention planning.


πŸš€ How to Run the Project

  1. Clone the repository
  2. Open the notebook in Jupyter Notebook
  3. Install required libraries
  4. Run all cells sequentially

About

An HR analytics project that predicts employee attrition using Logistic Regression, with performance evaluation based on accuracy, precision, recall, and F1-score.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published