# Elevator Fault Diagnosis Method Based on IAO-XGBoost under Unbalanced Samples
## 5 Elevator Car Fault Diagnosis Example Analysis
### Analysis of Results of XGBoost Parameter Optimization Method Based on IAO Algorithm  
#### 5.3.1 IAO Algorithm Performance Testing  
To verify the superiority of the IAO algorithm over other algorithms, a comparative experiment is conducted between the IAO algorithm and the AO algorithm, whale optimization algorithm (WOA), gray wolf optimization (GWO) algorithm, and mountain gazelle optimization (MGO) algorithm. The maximum number of iterations of the experimental parameters is 1000, and the population size is 20. The algorithm's performance test functions are presented in Table 5, which includes single-peak functions (F1 and F2) and multi-peak functions (F3 and F4).  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Sample Processing Methods** & **Accuracy/\%** \\ \hline Original dataset & 93.81 \\ RFE Feature Selection & 94.63 \\ SMOTE & 95.50 \\ Borderline-SMOTE & 96.78 \\ SMOTE-ENN & 96.75 \\ SMOTE-Tomek & 97.47 \\ RFE-SMOTE-Tomek & 97.88 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of fault diagnosis accuracy under different sample processing methods.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Data Type** & **Original Dataset** & **Sample Balanced Dataset** \\ \hline Normal & 217 & 217 \\ Loose guide shoe & 120 & 217 \\ Elevator emergency stop & 41 & 215 \\ Poor sliding of car door & 39 & 169 \\ Wear of traction rope & 37 & 160 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The distribution of the number of samples before and after the training set sample balance.  
Single-peak functions have no extreme points and only a unique optimal solution, while multi-peak functions have multiple extreme points and an optimal solution. The former verify the convergence speed and the ability of the algorithm to find the optimum, while the latter verify the ability of the algorithm to jump out of the local optimum.  
Figure 7 shows the convergence curves of each algorithm under different algorithm test functions. From the analysis of convergence speed, it can be seen from Figure 7a,b that WOA, GWO, and MGO did not find the extreme point during 1000 iterations. Due to the introduction of Tent chaotic mapping by IAO, the global optimal value can be found faster than the AO algorithm. The IAO algorithm has fallen into local optima, while the IAO algorithm, which introduces nonlinear inertia weights and nonlinear convergence factor strategies, overcomes the problem of falling into local optima. The IAO algorithm has found the extreme point 0 near 50 iterations. The other four algorithms of the IAO algorithm significantly improve the global search ability and convergence speed, moving towards the global optimal search and avoiding local optimal values.  
Figure 7c shows that the WOA and GWO algorithms have fallen into local optima, while AO, IAO, and MGO have found global optima. The IAO algorithm converges faster than the AO algorithm, and MGO jumps out of local optima and finds global optima after 800 iterations. The introduction of strategy in the IAO algorithm improves convergence efficiency and the ability to jump out of local optima compared to the AO and MGO algorithms.  
Figure 7d shows that the AO, IAO, WOA, and GWO algorithms have found global optima, while the GWO algorithm has fallen into local optima. WOA repeatedly falls into local optima and jumps out of local optima, ultimately finding the global optimum. The IAO algorithm quickly converges and finds the global optimal point.  
In summary, the IAO algorithm avoids falling into local optima and has a faster convergence speed than other algorithms. It can quickly find the global optimal value, indicating that the introduced strategy can effectively improve the algorithm's performance.