# Research on Distributed Fault Diagnosis Model of Elevator Based on PCA-LSTM
## 4 Experiments and Analysis
### Results and Analysis
Furthermore, the loss function value for our network on the test set is markedly lower than that of separate PCA and LSTM models, demonstrating that our proposed model offers superior diagnostic accuracy and stability. Figure 12 displays the comparative accuracies of three algorithms utilized for elevator fault diagnosis: PCA-LSTM, CNN (Convolutional Neural Network), and SVM (Support Vector Machine). The PCA-LSTM algorithm demonstrates the highest median accuracy, indicated with the blue box, and the narrowest interquartile range, suggesting consistently high performance across multiple datasets or diagnostic scenarios. The CNN and SVM, represented with the orange and green boxes, respectively, show lower median accuracies and wider interquartile ranges, which may indicate less consistency or sensitivity in detecting elevator faults compared to PCA-LSTM. PCA-LSTM's tailored combination of Principal Component Analysis and LSTM networks may give it an edge in capturing the temporal and feature-rich nuances of elevator operation data, which are crucial for accurate fault diagnosis. To test the performance of the proposed model, elevator failure prediction was performed on the same dataset using Principal Component Analysis (PCA) and the LSTM model, and the computational results are shown in Table 5. All the model inputs were three-dimensional main-feature signals, and the initial learning rate and batch size of the model were set to 0.001 and 64, respectively, while the number of iterations was 100 epochs; the validation set validated the model training effect, and the model parameters were fine-tuned according to the validation results. The comparative classification accuracy of different models for the validation set was calculated as shown in the table, and the change in the mean square error loss function value of the model validation set with network training is shown in Figure 8. The results show that the classification accuracy of the PCA-LSTM network proposed in this study is significantly higher than that of the general network, and the loss function values tested on the test set are also significantly lower than  
Figure 12: Comparison of PCA-LSTM’s accuracy compared to that of various algorithms. those of the PCA and LSTM models, which indicates that the diagnostic accuracy of the model proposed in this paper is high and reliable. In this study, we compared the performance of five different machine learning models in predicting elevator faults. As shown in Table 5, we evaluated the classification accuracy of RNN, LSTM, PCA-LSTM, CNN, and SVM models across training, validation, and test datasets, along with their number of iterations and testing times. The results demonstrate that the PCA-LSTM model achieved the highest accuracy on the test set at 92.85%, significantly outperforming the other models, followed by the LSTM model at 82.47%. Although the PCA-LSTM model required the longest testing time, its superior performance indicates a significant advantage in handling complex fault prediction tasks. In our study, the validation set was obtained through the stratified random sampling of the original dataset to ensure that the class distribution in the validation set mirrored that of the entire dataset. Specifically, we divided the entire dataset into training, validation, and test sets, allocating 70% for training and 15% each for validation and testing. During this division, we employed stratified sampling, which means the proportion of each fault type within each subset was consistent with their proportions in the original dataset. The purpose of this approach was to minimize the potential bias introduced by the data division, thereby ensuring fairness and accuracy in model evaluation. By using the validation set during training, we were able to monitor and adjust the model's performance to prevent overfitting and ultimately ensure the model's generalization ability using unseen data.