The Application of AI in Human Resources

Artificial Intelligence in Human Resources, AI HR
You will learn how to use the AI tools included in the AI-TOOLKIT for making HR decisions easily. In this case we will train an AI model which can be used to decide/predict if an employee will leave or why he/she will leave or even if it is worthwhile to offer a promotion to an employee.
The article will also explain and compare the different algorithm/tool options available in the AI-TOOLKIT.

You can apply the same principles to any other sector or business case, for example you could predict if a client will leave, why it will leave, or if it is worthwhile to offer a discount, etc.

The Dataset

The dataset contains 15000 rows (records) and 10 columns (variables). You can download the data at the end of this article. In case you are doing this in your company you should first study which variables influence the most the specific business case, in this example an HR problem, and select the variables accordingly. Selecting not enough or too many variables (not enough knowledge or unneeded noise) will result in a less useful or less accurate AI model.

The 10 columns are the following:
  • Satisfaction Level (0-1)
  • Last evaluation (0-1)
  • Number of projects (integer)
  • Average monthly hours (integer)
  • Time spent at the company (integer)
  • Whether they have had a work accident (0-no, 1-yes)
  • Whether they have had a promotion in the last 5 years  (0-no, 1-yes)
  • Department name (text)
  • Salary (text: low, medium, high)
  • Whether the employee has left (0-no, 1-yes)

Depending on which variable (column) you choose as decision variable you can train a model for different purposes for example to predict whether the employee will leave in the future, whether it is worthwhile to offer a promotion, etc.

In this example we will choose the ‘Left’ (whether the employee has left) column as decision variable in order to be able to predict if an employee will leave or not.

Artificial Intelligence in Human Resources, AI HR

Training the AI Model

The different tools in the AI-TOOLKIT use different types of AI algorithms. Each algorithm has its advantages and disadvantages. Some algorithms are well suited for one type of data but not for another type of data. Neural network based AI algorithms can be tuned in such way that they can be applied to all kinds of problems but with the cost of complexity (several layers with often many nodes and even different types of layers) and processing speed (more layers and nodes mean more processing time). Therefore it is worthwhile to choose the tool you want to use in a clever way!

Support Vector Machine (SVM) model

You can easily import your numerical delimited data into the AI-TOOLKIT. The SVM model has several parameters which can be automatically optimized by the built-in parameter optimization module.
The optimal parameters for this problem are C = 100, Kernel Type = RBF and gamma = 10.
The accuracy of the trained model is above 99.9%.

DeepAI Educational Neural Network Model

The deep neural network model in DeepAI is based on a semi-automatic multilayer and multimode neural network implementation. The software designs the neural network semi-automatically, you only need to define the number of layers and nodes per layer (you can of course adjust some more parameters but this is most of the time not necessary). DeepAI Educational does not use very complex state of the art neural network architectures but provide in many cases a good result.

DeepAI uses the SSV data file format (delimited text file). Adjust the settings in the ‘Settings/AI’ tab according to the setting shown in the image below in case they are different. Use the ‘Load Data File’ command and load the data file. DeepAI will automatically design a neural network for the data file. This neural network will provide good results but let us add an extra layer (4 layers in total) and adjust the number of nodes to 24 on the second layer and 10 on the third layer. The first and the last layers have a fixed number of nodes depending on the input functions and the output (1).
Change the number of iterations to 480 and start the training process with the Run command. After a while (2-3 min) the below results will appear which indicate 98 % accuracy for the training data. You still can fine tune the model and obtain a higher accuracy but this is not a fast and simple process. Fine tuning a neural network is a tedious and often long lasting process (adjusting the number of layers, adjusting the number of nodes per layer, adjusting the learning rate, the activation function, etc.). It is also not sure that more layers and nodes will provide better results but you will need to find the optimal solution also depending on the other parameters.

DeepAI AI-TOOLKIT Artificial Intelligence Toolkit Neural Network

Comparison of the results

Below you will find the comparison of the trained model accuracy with the different tools in the AI-TOOLKIT and from other sources. You can use the trained models to predict if an employee will leave.

Model
Accuracy
AI-TOOLKIT:
Numerical model (SVM based)
99.9 %
DeepAI Educational:
Neural Network (simple, not optimized)
98.0 %
Analyses results from other sources:
Gradient Boosting
99.2 %
Random Forest
98.8 %
Support Vector Machine (SVM)
97.4 %
Decision Tree

Source: https://www.kaggle.com/ahujam/using-machine-learning-to-predict-attrition-in-hr
97.2 %

Using the trained AI models

You can use the trained AI models for making automatic and precise decisions about this HR problem.

Conclusion

The different tools in the AI-TOOLKIT use different types of AI algorithms (SVM, Random Forest, Neural Network, etc.). Each algorithm has its advantages and disadvantages depending on the input data. Training Neural Network based AI models is more work than training the other types of AI models. Therefore choose your AI model wisely! The accuracy of the trained AI model mainly depends on the input data and also on the parameters of the models. The quality of the data is very important therefore always check the data before training your AI model. In case the accuracy of the trained AI model is very low then it is very probable that there is something wrong with the data!

Download the Dataset

You can download the dataset in MS Excel format here: HR_comma_sep_u.xls

References
  • HR Analytics Dataset: Attribution-Share Alike 4.0 International (CC BY-SA 4.0) license, Source: https://www.kaggle.com/ludobenistant/hr-analytics






Contact

Contact Person

Address

Antwerp, Belgium

You may use LinkedIn (phone number and email available) or the contact form to the right.

Helpdesk

You may contact the AI-TOOLKIT helpdesk:


Search This Website