# Predicting Employee Attrition Using Machine Learning Approaches
## 5 Results and Discussions  
The results and evaluations of our proposed research study are examined in this section. All the experiments were run on a machine with specifications of Intel (R) Xeon (R) CPU, 13 GB RAM, 2249.998 MHz CPU, 512 KB cache size, and the CPU model name is AMD EPYC 7B12. The results in terms of predicting employee attrition were carefully examined. The evaluation metrics of our machine learning-based research study include the training accuracy, testing accuracy, precision score, recall score, f1 measure score, and ROC curve score. The followings are the important factors of evaluation metrics:  
* **True Positive**: when both the predicted values and actual values are positive;
* **True Negative**: when both the predicted values and actual values are negative;
* **False Positive**: when the approach predicts a value as positive but the actual value is negative;
* **False Negative**: when the approach predicts a value as negative, but the actual value is positive. During the training and testing process of our proposed ETC model, the accuracy score results were measured. In order to demonstrate how much our machine learning model is accurate on training and testing data, we found that our model achieved a 93% of accuracy score on unseen data. Then we made our model generalize. In order to calculate the accuracy score, the formula equation is expressed in Equation (5). \[\text{Accuracy}=\frac{\text{True Positive value }+\text{ True Negative value}}{\text{True Positive value }+\text{ False Positive value}+\text{True Negative value}+\text{False Negative value}}, \tag{5}\] \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Sr No.** & **Technique** & **Kernel/Solver** & **C** & **Random State** & **Max Depth** \\ \hline
1 & ETC & ’gini’ & None & 5 & 300 \\
2 & SVM & ’poly’ & 9.0 & 500 & None \\
3 & LR & ’saga’ & 9.0 & 1000 & None \\
4 & DTC & ’gini’ & None & None & 300 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The hyperparameter configuration parameters of all employed approaches. The precision is the measure of the model that correctly identifies values as positive out of all values. The recall of the model is the measure of correctly identifying true positive values. The recall and precision scores of our proposed model are 93%. The mathematical notations to calculate the precision and recall are expressed in Equations (6) and (7), respectively. \[\text{Precision}=\frac{\text{True Positive value}}{\text{True Positive value}\ +\text{False Positive value}}, \tag{6}\]  
\[\text{Recall}=\frac{\text{True Positive value}}{\text{True Positive value}\ +\text{False Negative value}}, \tag{7}\]  
The f1 score was utilized to summarize the performance of our predictive model. The f1 score combines the recall and precision score values. The f1 score value of our model was 93%. The log loss is a Logarithmic cost function used to find the loss of the model in classification. The log loss value of our model was 2.3337248795797283. The f1 score was calculated as expressed in Equation (8). \[\text{F1}-\text{score}\ =\frac{2*\text{Recall}\ *\ \text{Precision}}{\text{Recall}\ +\ \text{Precision}}, \tag{8}\]  
The ROC curve accuracy metric was utilized to measure the accuracy of the predictive model in terms of the area under the curve at the different thresholds of the target class. The ROC accuracy of our model was 93%. In order to calculate the ROC accuracy, Equation (9) is expressed. \[\text{ROC accuracy}=\int_{0}^{1}(\text{True Positive value}\ )*\text{False Positive value}*d(\text{False Positive value}), \tag{9}\]  
The comparative performance analysis among the applied machine learning techniques is examined in Table 3. The analysis demonstrates that the LR technique has a low accuracy score of 72% results among all. The proposed ETC technique achieved the highest accuracy of 93%. Our proposed ETC approach outperformed.