Skip to content

About

Data analysis and machine learning project analyzing employee attrition at Salifort Motors. Includes data cleaning, exploratory data analysis (EDA), and predictive modeling (Logistic Regression, Decision Tree, Random Forest) to identify key factors influencing employee turnover and provide actionable HR recommendations.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

Repository files navigation

Salifort Employee Retention Analysis

Project Overview

This project analyzes employee data from Salifort Motors to identify factors associated with employee turnover and to build models that predict whether an employee is likely to leave the company.

Employee retention is an important issue for organizations because recruiting and training new employees is costly and time-consuming. By identifying the factors that contribute to employee attrition, the HR department can implement strategies to improve employee satisfaction and retention.

This project was completed as part of the Google Advanced Data Analytics Professional Certificate Capstone Project.

Business Problem

The HR department at Salifort Motors collected employee data but needed help answering the following question:

What’s likely to make the employee leave the company?

The goal of the analysis was to:

  • Identify factors associated with employee turnover.
  • Build predictive models to classify employees likely to leave.
  • Provide data-driven recommendations to improve employee retention.

Dataset

The dataset contains approximately 15,000 employee records and 10 variables describing employee satisfaction, workload, tenure, salary level, and department.

Key variables include:

  • satisfaction_level – employee reported job satisfaction
  • last_evaluation – performance evaluation score
  • number_project – number of projects assigned
  • average_monthly_hours – average hours worked per month
  • time_spend_company – employee tenure
  • work_accident – employee experienced an accident at work
  • promotion_last_5years – promotion status
  • department – department
  • salary – salary in U.S. dollars
  • left – target variable indicating whether the employee left or stayed

Methods

The analysis followed a standard data science workflow:

1. Data Cleaning and Preliminary Analysis

  • Inspected data types and summary statistics.
  • Removed duplicate observations.
  • Examined potential outliers.
  • Renamed variables for clarity.

2. Exploratory Data Analysis

Visualization techniques included:

  • Histograms for numeric variables.
  • Bar plots for categorical variables.
  • Boxplots comparing features with employee turnover.
  • Correlation heatmaps.
  • Pairplots for variable relationships.

These visualizations helped identify patterns related to employee attrition.

3. Feature Engineering

  • One-hot encoding of categorical department variables.
  • Ordinal encoding of salary levels.
  • Removal of outliers for logistic regression modeling.

4. Predictive Modeling

Three classification models were implemented:

  • Logistic Regression
  • Decision Tree
  • Random Forest

Hyperparameter tuning was performed using GridSearchCV with cross-validation.

Models were evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1-score
  • ROC–AUC

Results

The Random Forest model produced the best predictive performance.

Model Performance

Metric Score
Accuracy 98.23%
Precision 98.41%
Recall 90.82%
F1 Score 94.46%
ROC–AUC 0.98

Feature importance analysis showed that the most influential predictors of employee turnover were:

  • Satisfaction level.
  • Number of projects.
  • Years at company.
  • Average monthly hours.
  • Last evaluation score.

Key Insights

  • Employees who left typically had lower satisfaction levels.
  • Many employees who left were working long hours and managing multiple projects.
  • A large proportion of departures occurred among employees with 3–5 years of tenure.
  • Higher salary levels were associated with lower turnover rates.
  • Employees who received promotions rarely left the company.

These findings suggest that workload and job satisfaction are major drivers of employee attrition.

Recommendations

  • Improve work–life balance by reducing excessive workloads and project assignments.
  • Monitor employees with 3–5 years of tenure, since turnover peaks during this period.
  • Review company evaluation metrics that may implicitly reward long working hours.
  • Increase opportunities for career advancement and promotions.
  • Set clearer expectations about workload and company culture during employee onboarding.

Next Steps

  • Cluster employees using K-means to identify groups with similar characteristics, specially for those with 3 years of employment.
  • Evaluate models without the satisfaction variable if these surveys are not frequently done.
  • Review evaluation metrics to make sure they are aligned with employees expectations.

Repository Contents

salifort-case-study/
├── salifort-motors-case-study-python.ipynb
├── figures
│   ├── confusion_matrix.png
│   ├── decision_tree_plot.png
│   └── feature_importance.png
└── README.md

Technologies Used

  • Python
  • pandas
  • NumPy
  • seaborn
  • matplotlib
  • scikit-learn

Project Type

Capstone project from the Google Advanced Data Analytics Professional Certificate demonstrating:

  • Exploratory data analysis.
  • Machine learning classification.
  • Model evaluation.
  • Business-oriented data insights.

About

Data analysis and machine learning project analyzing employee attrition at Salifort Motors. Includes data cleaning, exploratory data analysis (EDA), and predictive modeling (Logistic Regression, Decision Tree, Random Forest) to identify key factors influencing employee turnover and provide actionable HR recommendations.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages