I would like to discuss about two things in this blog:
- Use of right performance measure for model evaluation
- Analysis of human behaviour
1. Right Performance Matrix
I observed that several solutions talk about model accuracy, AUC-ROC etc. as performance measure for the given problem statement. It is well known that Model accuracy is not an apt performance measure parameter for unbalanced data. Model accuracy doesn't help much more than 'pure chance'
or prior probability of the model. That is to say, if the interested target class (attrite employees in current scenario, ~16%) is very small as compared to the other class (~84%), then a simple model with overall accuracy of 85% is just as good as picking a random observation and assigning it to the major class (non-attrite in this case).
Which performance parameter should be used in this case? There is no single answer to this question, and right performance measure depends on the business scenario. Referring back to my previous blog, quality of business decision greatly depends on making a right hypothesis and apt significance level to test. In the given scenario, each individual employee will be evaluated for determining probability of him/her leaving the company, which depends on measured values of several independent variables (salary, age, overtime.....). If the independent variables can be combined in a single function (such as using linear regression or NN), then the function output and probability of employee leaving can be plotted for people who left (target = 1), and people who did not leave (target = 0). In order to predict if a current employee will leave the company or not, the null hypothesis (or status quo) would be "employee will stay with the company", while alternate becomes "employee is looking for change and will resign". Again, significant overlap can be expected between probability distribution curves of the employees who have stayed and who have left the company.
If the model predicts an employee to be leaving the company, but the employee stays, it would be a false positive or false alarm or Type-I error. However, if the model fails to predict about an employee who actually left, this would be a missed opportunity (to retain the employee) or False negative or Type-II error. A correctly identified employee who was planning to leave would be True positive. Now, depending on the cost of making Type-I or Type-II error, a suitable model performance parameter should be used for optimising the model. Let's say, if it takes 2 Hrs of HR time to discuss and understand from a predicted employee reason for his / her possible resignation, vs. it takes 80 Hrs of total time for backfill. In this case, if model predicts several False positive cases (false alarms or high Type-I error) who were not planning to leave the company, then HR would end up spending few extra days in discussions with these false positive employees. However, if the model fails to predict actual positive resignation cases, then the backfill efforts may take weeks or months! Not to mention losing company's IP to competitors.
You may want the model to predict maximum number of True positive cases, even if it produces false positives in doing so. Not only model accuracy, but also AUC-ROC may not give desired results in this case. The most important parameter in this case is sensitivity (or recall or True Positive Rate), i.e. out of total actual positive cases, how many positive cases did the model predict? Other secondary important parameter would be Precision (or positive predicted value), i.e. out of total predicted positive cases, how many are actual positive? While sensitivity (or recall) dictates "how complete the predicted results are?", precision dictates "how relevant the predicted results are?". Details on precision and recall on Wiki are very helpful in understanding.
So which measure encompasses these two measures? F-Score! Given that Sensitivity or recall is more important in given scenario, beta > 1 should be used to calculate F-score, and to compare model performance. If the cost of dealing with False positive increases, then beta value can be lowered and precision to be improved. For e.g. if HR resources are limited, and want to discuss with limited employees who have very high probability of resigning. Anyway, this filtering and prioritisation can be done even after model prediction, and some of the employees might fall under 'desired attrition' group.
In other business scenario when cost of making Type-I error (False positives, false alarm) is very high, False positive rate (FPR) or False discovery rate (FDR) should be looked into, or further measurements should be done before accepting the positive cases. For e.g., if a False positive results into sending a patient in amputation surgery, or leads to a marriage, more data gathering / tests should be conducted before taking the decision.
2. Analysis of Human Behaviour
After I completed the above analysis, optimising the Precision and Recall of various models, I realised different people-analytics models have something in common. All of these models are trying to predict people's 'behaviour' given environmental conditions, recent & past experiences, demographics, their background (education, family etc.). In a way, these models are trying to predict people's behaviour based on their attitude, which is based on their values, which are based on their beliefs:
![]() |
| source: New Zealand Immigration Advisers Authority |
The given problem of employee attrition provides some detail about demographic, and relationship with current & past companies. Similar data when available in other business scenario can help in customer profiling (clustering) as well as predictions (classification). However, what is missing from the given fictitious data is recent behaviour of employees during couple of months before resigning. Such data has shown to be very helpful in churn analysis for service industry. Customers show significant change in service-usage before making a switch to other service provider, and this sudden change in usage pattern can help predict and hopefully prevent a losing customer. If similar data is monitored about employee's engagement each month, a sudden change in employee's behaviour would help predict an unsatisfied employee, who might be looking for external options. This is to say, rather than just focusing on the customer/employee profile, companies should also monitor how the customer/employee is recently behaving to understand if the customer/employee is going to leave your services/company.
For e.g. any organisation or telecom company or a bank will have employees / customers with varied backgrounds (age, salary, marital status etc.) and it may become very difficult to classify the employees / customers based on such static variables. However, employees or customers who are planning to leave the organisation / service provider might start acting differently than they used to act previously, or act similarly to others who had left earlier. And hence, a comprehensive HR analytics would require not only collecting static (during joining) or quasi-static (yearly) data about employees, but dynamic data (weekly or monthly) for improved prediction. Sometimes even couple of weeks of heads-up is good enough for HR to intervene and take corrective actions to retain high value employees.
