# Predicting Employee Attrition Using Machine Learning Approaches
## 3 Methodology
### Employee Exploratory Data Analysis (EEDA)  
The Employee Exploratory Data Analysis (EEDA) was applied to obtain useful insights from the HR employee attrition dataset. The EEDA was used to critically examine the feature and factors that are the major causes of employee attrition. We examined the feature through numerous kinds of plots and time-series analyses. The EEDA demonstrated the data patterns and proved helpful for data factors analysis in the context of employee attrition. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Column** & **Non-Null Count** & **Data Type** & **Column** & **Non-Null Count** & **Data Type** \\ \hline Age & 1470 & int64 & MonthlyHome & 1470 & int64 \\ Attrition & 1470 & object & MonthlyRate & 1470 & int64 \\ BusinessTravel & 1470 & object & NumCompaniesWorked & 1470 & int64 \\ DailyRate & 1470 & int64 & Over18 & 1470 & object \\ Department & 1470 & object & OverTime & 1470 & object \\ DistanceFromHome & 1470 & int64 & PercentiSalaryHike & 1470 & int64 \\ Education & 1470 & int64 & PerformanceRating & 1470 & int64 \\ EducationField & 1470 & object & RelationshipSatisfaction & 1470 & int64 \\ EmployeeCount & 1470 & int64 & StandardHours & 1470 & int64 \\ EmployeeNumber & 1470 & int64 & StockOptionLevel & 1470 & int64 \\ EnvironmentSatisfaction & 1470 & int64 & TotalWorkingYears & 1470 & int64 \\ Gender & 1470 & object & TrainingTimesLastYear & 1470 & int64 \\ HourlyRate & 1470 & int64 & WorkLifeBalance & 1470 & int64 \\ JobInvvement & 1470 & int64 & YearsAtCompany & 1470 & int64 \\ JobLevel & 1470 & int64 & YearsLCurrentRole & 1470 & int64 \\ JobRole & 1470 & object & YearsSinceLastPromotion & 1470 & int64 \\ JobSatisfaction & 1470 & int64 & YearsWithCurrManager & 1470 & int64 \\ MaritalStatus & 1470 & object & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The dataset feature analyses and related information. Figure 1: The methodological analysis of our proposed research study for employee attrition prediction. The data distribution plot for analysis of the monthly income with the total working years features that effects the employee attrition is examined in Figure 2. The total working years data were mapped on the \(x\)-axis, and the monthly income data were mapped on the \(y\)-axis. The analysis demonstrates that during one year of working, the monthly income is low, and the employee attrition is high. During the working years from one to four, the employee attrition is low. As the monthly income increase, the chances of employee attrition are less. From year four to eleven, the employee attrition is low. For the next working years, the attrition rate is almost low. This analysis shows a higher rate of employee attrition when the monthly income is low and the working year is less. The monthly income is a factor that is affecting employee attrition. The data analysis in distributions and line graphs of the monthly income with the age features is examined in Figure 4. The analysis demonstrates that when the employee age is 10 to 25, the employee attrition rate is high. As the age increase, the attrition rate is low. The employee attrition rate is high when the monthly income is 1000 to 5000. The analysis shows that age affects the attrition rate. In lower age years, the attrition rate is very high, and the monthly income along with. The data distribution plot for analysis of the hourly rate with the total working years features that effects the employee attrition is examined in Figure 3. The analysis demonstrates that during the working of one year and the hourly rate between 30 and 70, the employee attrition is high. From the working year 2 to 10, the employee attrition is low. As the hourly rate increases, employee attrition increases. From the analysis, from working years 20 to 40, there is zero employee attrition when the hourly rate is between 30 and 50. The hourly rate factors affect employee attrition. Figure 2: The total working years and monthly income data distribution analysis by employee attrition.