Using HR Data to Predict When Your Best Employees Will Leave

Business is all about humans. Being an AI company, it may be a common misconception we aren’t human centered. However, this use case is important to us to share because it shows how to put humans at the center of your employee experience while also using data to help make employees happier. A big thing for us is showing how machine learning and AI can actually contribute to putting humans first. For this post, we’re focusing on the most empathy-led department in business.

The Human Resources department is in charge of taking care of employee’s well being and ensuring they are happy with their position. With machine learning you can actually predict employee attrition to see what causes a valuable employee to leave or stay with a company. This is perfect for HR managers planning their hiring and auditing employee experience.

What is Employee Attrition?

According to Jobzology, “Staff attrition refers to the loss of employees through a natural process, such as retirement, resignation, elimination of a position, personal health, or other similar reasons. With attrition, an employer will not fill the vacancy left by the former employee.”

Attrition is different from turnover. Employee turnover refers to an employee being terminated or resigning with the purpose of being replaced. Attrition occurs when the role is left vacant or eliminated. 

Reasons to Predict Employee Attrition

With machine learning, HR managers will be able to foresee vacant positions, team budget needs, what employee benefits they can improve to keep employees happy, what departments are the most and least likely to stay at a position for a length of time, and more. 

As a business, you can predict questions like, 

  • What causes employee churn?
  • Why do we lose valuable employees?
  • When will an employee most likely leave the company?
Predicting these things would save a lot of money in the long run. According to the Center of American Progress,

“For positions that earn between $30,000 and $50,000 per year, the cost of replacement was found to be 20% of annual salary. For executives earning high salaries, the cost of replacement was found to be 213% of annual salary. (Boushey & Glynn, 2012). For example, an executive who earns $100,000 would cost $213,000 to replace.”

If you can predict why an employee will leave the company, you can identify why and when to create a better employee experience and reduce employee turnover and attrition. 

About the Dataset

From a fictional, publicly available dataset created by IBM Data Scientists, we can explore important questions such as “show me a breakdown of distance from home by job role and attrition” or “compare average monthly income by education and attrition.”


Exploring the Results of the Data Predictions

If you’ve been following us for a while, you know we’ve simplified the ML process down to 3 steps. Simply download the dataset in a CSV file, move the employee identifier column to the first column, upload to Obviously AI and you’re good to predict. 

You can compare it to a more complex process and see the benefits of no-code machine learning compared to traditional. 

When predicting employee attrition, you can check out the Data Dialog, a new feature we’ve added to further customize your predictions and see what columns are going into them. 


Here you choose an “Identifier Column” and a “Prediction Column.” You can also set filters and select columns that won’t be used in your prediction.


We’re taken to the Prediction Report where we can instantly see the top drivers related to employee attrition. 

  1. Overtime
  2. Department
  3. Years Since Last Promotion
  4. Distance the Office is From Home
  5. Number of Companies Worked For

What’s already surprising is the hourly rate and monthly rate and percentage of salary hike contribute to employee attrition the least

Let’s explore how overtime affects employee attrition.



In the graphs section of the Prediction Report, you can toggle between “Yes” and “No” to see the likelihood of each.

For this use case, I chose Yes.



If an employee consistently works overtime or given the overtime option they have a 32.8% chance of employee attrition, compared to 10.2% chance of not leaving.


Moving on to department, the Sales department has a higher chance (19.3%) of employee attrition, compared to R&D and HR. 


The Years Since Last Promotion column is interesting because it says those who haven’t been promoted recently are less likely to leave. This may suggest that once an employee reaches a goal or position, they might use it as a stopping point.

You can compare this to another column like Years in Current Role to get more of an idea of the likelihood of someone retiring after being promoted and spending a certain amount of time in that role. 


There are Many Other Things to Explore in This Data Prediction

We’ve only scratched the surface. We did not even explore how employee satisfaction or performance rating come into play. This dataset has a lot of columns to explore and we suggest exploring it yourself inside Obviously AI.

If you want more use cases like this, feel free to reach out on Twitter!   



Exclusive datasets, guides, and insights to your inbox.

Join 3,000 subscribers. GDPR and CCPA compliant.