1. A t t r i t i o n
a n d i t s
m a n y
n a m e s
Attrition refers to the gradual loss of employees or
customers over time. It is a common phenomenon in
businesses, especially in the early stages of growth.
Attrition can be caused by various factors, such as low
employee morale, inadequate compensation, lack of
career advancement opportunities, and poor
There are different words and phrases used to describe
attrition, such as:
• T u r n A r o u n d
• S t a f f Ch u r n
• Employee Exodus
• Ta l e n t Dr a i n
2. How Much Attrition Costs
1.Cost of replacing an employee can range from 50%
to 200% of their annual salary.
2. Cost includes : job postings, recruitment agencies,
background checks, onboarding, and training.
3. Lost tribal knowledge
4. Attrition heightens burnout risk, reduces team
3. Attrition at Amazon is costing the company $8 Billion a year, with
workers twice as likely to leave by choice than be fired, report says
4. Let’s Put Some Numbers To The Face Of Attrition
Consider an example of attrition's impact in a company of 500 employees with a yearly attrition rate of 10%.
• Total Employees: 500
• Yearly Attrition Rate: 10%
• Number of employees lost to attrition in a year: 10% of 500 = 50 employees.
2. Therefore, the cost to replace one employee = 1.5 * $60,000 = $90,000
• The cost to replace an employee is about 1.5 times their annual salary.
• The average salary of an employee in the company is $60,000.
3. Total cost of Attrition in a year:
• Total cost = number of employees lost to attrition * cost to replace one employee
• Total cost = 50 * $90,000 = $4,500,000
The company is losing $4,500,000 a year to attrition.
It's important to take steps to prevent it. One way to do this is by using predictive machine learning on your HR dataset.
By analyzing data such as length of tenure, age group, supervisor_id, company_id, and salary, you can identify
employees who are at risk of leaving and take proactive steps to retain them.
No Coded Bias : To ensure that there was no coded-bias, you have to carefully select the data to be used. We removed
gender, ethnicity, and nationality, and focused only on the most relevant factors. This will help us to create a fair and
unbiased model that can accurately predict attrition and help us to retain our valuable employees.
Cleaned Dataset from Human Resource Department
Company_ID Supervisor_ID Employee_ID Age_Group Tenure_Length Salary Job_Title City Attrition
6. My Best Model for Predicting Employee Attrition
After testing five different machine learning models using different classifiers, I found that the AdaBoostClassifier from
Python's ‘sklearn’ library was the most effective for predicting employee attrition. To test its accuracy, I used a subset of
our HR data where all employees were still active and predicted which ones were at risk of leaving.
The model had :
• Accuracy rate 71%
• Precision score 35%
• Recall/Sensitivity score 35%
• Specificity score 81%
To identify the most important independent features for predicting attrition, I used the Boruta package. This analysis
revealed that supervisor_id had the highest importance score. By using this information to proactively retain high-risk
employees, we can reduce our company's attrition rate and improve overall retention.
7. Definition of Accuracy, Precision, Sensitivity, and Specificity
Accuracy is the measure of how close a prediction or measurement is to its true value. It's like trying to hit the bullseye
on a dartboard - accuracy is how close you are to the exact target.
Precision, on the other hand, is the measure of how consistently you can hit the same spot, even if it's not the bullseye.
If you always hit the same spot, you're precise.
Sensitivity is the measure of how good you are at finding all the needles in a haystack, without missing any.
Finally, specificity is your skill at not mistaking a piece of straw for a needle - you only pick up needles, not anything
Understanding these four concepts is crucial when evaluating the performance of predictive models. For example, in
the previous page, we saw that the AdaBoostClassifier had an accuracy rate of 71%, which means that it correctly
predicted 71% of employee attrition cases. However, its precision score was only 35%, indicating that it was not very
consistent in identifying employees who were truly at risk of leaving. The recall/sensitivity score was also 35%, which
means that the model missed many employees who were actually at risk of leaving. Finally, the specificity score was
81%, indicating that the model was good at not falsely identifying employees as being at risk of leaving.
8. Attrition Prevention: Using Feature Impact
Our algorithm's Feature Impact allows us to pinpoint the most impactful attributes in our attrition prediction dataset
and respond accordingly.
1.Increasing salary: If 'salary' appears as a significant feature in our results, we'll understand that better
compensation may be key in retaining our at-risk employees, contributing to their sense of value and job
2. Offering promotions: Should 'tenure length' or 'years at company' emerge as pivotal features, rewarding
exceptional performance or company loyalty with promotions not only boosts morale but also demonstrates that
the company values its employees.
3. Changing supervisors or departments: If the 'work environment' or 'supervisor_id' variables are impactful, offering
a fresh start and a new set of challenges could rejuvenate an employee's motivation and outlook.
4. Assigning challenging projects: When 'job involvement' or 'role breadth' are significant, providing opportunities for
learning and growth can keep employees engaged and foster a sense of purpose.
By aligning our strategies with the insights gleaned from the Feature Impact of our attrition prediction algorithm, we
can enhance employee retention and cultivate a work environment where employees feel appreciated, challenged, and
invested in their roles.
9. Challenges of Implementing AI Solutions in 2023 and Beyond
In 2023, ChatGPT and AI have become mainstream technologies ( this slide deck was made using “tome.app” ) , but
with this popularity comes the growing need for regulation and auditing of the code behind them.
Europe's GDPR, Ireland's Data Protection Commission policies, California's CCPA (California Consumer Privacy Act)
and NYC's AI software audit legislations (NYC 144) are all making it increasingly interesting to create such solutions
and implement them into production.
Best strategy for 2023 : Not to go live with our project due to the foresight that things are changing rapidly in the world
of AI and Data and we would first like to observe the development and then perform actions based on insights.
10. But if we do move forward : F1 Score and Cost
1.F1Score : Balances accuracy in tricky situations
2. F1Score : 2 * (precision * recall) / (precision + recall)
3. (We scored 35%)
4. Taking Amazon's problem as example: Losing $8 billion yearly due
5. Amazon saves $2.8 billion!