# The Debris Flow Risk Prediction Model Based on PCA-Elman
## 4 Results  
### Analysis of Prediction Accuracy  
The PCA-Elman model predictions were conducted using 5-fold cross-validation, and the actual values from the test set along with the model's predictions are displayed in Figure 6, the confusion matrix. The confusion matrix presents a comparison between the model's predicted outcomes and the actual labels in matrix form. In the confusion matrix, the horizontal axis represents the model's predicted results, the vertical axis represents the actual category labels, the sum of the values in each row indicates the number of actual samples for that category, the values in each column represent the number of times real data was predicted as that category, the diagonal elements indicate the number of samples correctly classified, and the off-diagonal elements represent the number of misclassified samples. Observations from the figure reveal that the model demonstrated a high overall prediction accuracy across the five experiments, with the first three experiments achieving \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Evaluation Indicators** & **F1** & **F2** & **F3** & **F4** \\ \hline S1 & 0.33 & \(-0.05\) & \(-0.02\) & 0.08 \\ S2 & 0.38 & \(-0.12\) & \(-0.16\) & \(-0.06\) \\ S3 & \(-0.15\) & 0.42 & \(-0.09\) & 0.04 \\ S4 & \(-0.09\) & 0.45 & \(-0.24\) & 0.12 \\ S5 & \(-0.06\) & 0.29 & 0.08 & 0.01 \\ S6 & 0.11 & 0.04 & 0.26 & \(-0.07\) \\ S7 & 0.34 & \(-0.11\) & 0.07 & 0.06 \\ S8 & 0.05 & 0.09 & 0.09 & 0.81 \\ S9 & \(-0.05\) & \(-0.04\) & \(-0.04\) & 0.42 \\ S10 & \(-0.05\) & \(-0.13\) & 0.84 & 0.08 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Matrix of scoring coefficients for evaluation indicators. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Evaluation Indicators** & **F1** & **F2** & **F3** & **F4** \\ \hline S1 & 0.96 & & & \\ S2 & 0.93 & & & \\ S4 & & 0.93 & & \\ S3 & & 0.91 & & \\ S7 & & 0.91 & & \\ S6 & & 0.89 & & \\ S5 & & 0.8 & & \\ S10 & & & 0.98 & \\ S8 & & & 0.93 & \\ S9 & & & 0.86 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Factor loading matrix. a 100% accuracy rate. However, there was a slight decrease in accuracy in the fourth and fifth experiments, with accuracy rates of 75% and 62.5%, respectively. Specifically, the fourth experiment had two misclassifications, where category 1 was misclassified as category 2 and category 3 was misclassified as category 2; the fifth experiment had three misclassifications, including one instance of category 1 being misclassified as category 2 and two instances of category 2 being misclassified as category 3. These misclassifications may be related to the scarcity of samples from category 1 in the training set, leading to the model's inability to fully learn and accurately distinguish between different categories. Overall, the average accuracy rate of the PCA-Elman model reached 87.5%, indicating that the model has high accuracy and reliability in predicting debris flow hazards, meeting the needs of practical engineering applications, and providing strong technical support for the risk assessment of debris flow disasters. To evaluate the performance of the Elman Neural Network, traditional models such as RF, SVM, and BP were introduced for comparative validation, and ROC and PR curves were selected as metrics to assess model performance, as shown in Figures 7 and 8. The ROC curve (Figure 7) assesses the model's predictive ability by combining the true-positive rate (sensitivity) and the false-positive rate (1-specificity), while the PR curve (Figure 8) evaluates the model's ability to recognize positive-class samples based on recall and precision, especially in cases of unbalanced data. Observations from the figures indicate that the PCA-Elman model excels in both metrics, with an area under the ROC curve (AUC value) of 0.883 and an area under the PR curve (AP value) of 0.977, both higher than those of the PCA-BP, PCA-SVM, and PCA-RF models. This suggests that the PCA-Elman model has high accuracy and reliability in distinguishing the risk levels of debris flows.