## 5 Deep Learning Prediction Results and Model Comparison
### Duffing Equation Damped and Forced Vibration Type  
After training the models in Sections 4.3 and 4.4, we proceed to predict the single-cycle convergence results in the Duffing equation dataset containing damping and external force, using the prediction set. Both the LSTM model and the LSTM-NN model are utilized for this prediction. Figures 40-43 display the results of predicting the maximum velocity, \begin{table}
\begin{tabular}{|c c c|} \hline \multicolumn{3}{|c|}{**LSTM and LSTM-NN Confusion Matrices Value**} \\ \hline Accuracy (\%) & LSTM & LSTM-NN \\ \hline \(1\) & 86 & 98 \\ \(-1\) & 96 & 87 \\ \hline Loss (\%) & LSTM & LSTM-NN \\ \hline \(1\) & 14 & 1.8 \\ \(-1\) & 4.5 & 13 \\ \hline \end{tabular}
\end{table} 
Table 6: Confusion matrices values for the undamped system. Figures 40-43 present the prediction graphs, with the horizontal axis representing the actual value and the vertical axis representing the predicted value. The dashed line represents the baseline where the actual value is equal to the predicted value. These figures provide an overview of the prediction results for the two models. Upon analyzing the training phase, it becomes evident that the LSTM-NN model performs better during training. However, the prediction results are not as satisfactory, indicating an overfitting problem during training for the LSTM-NN model. Notably, the prediction accuracy for velocity is noticeably higher compared to displacement. This discrepancy may arise due to the model's insensitivity in capturing the data characteristics of displacement or the presence of poor-quality displacement data, resulting in inferior prediction performance. Between the two models, the LSTM model demonstrates superior accuracy compared to the LSTM-NN model. Table 7 shows the error analysis for the damped System by MSE (mean-square error) and RMSE (Root mean square error). For the case of maximum displacement (Max Displ. ): LSTM model achieves a MSE of 0.0484, while LSTM-NN has a higher MSE of 0.0953. The LSTM model has a RMSE of 2.1993, whereas LSTM-NN's RMSE is higher at 3.0871. For the case of maximum velocity (Max Vel. ): the LSTM model exhibits a MSE of 0.0527, whereas LSTM-NN has a higher MSE of 0.0960. The LSTM model records a RMSE of 2.1812, while LSTM-NN has a higher RMSE of 3.0988. For the case of minimum displacement (Min Displ. ): the LSTM model achieves a MSE of 0.0476, while LSTM-NN has a higher MSE of 0.0958. The LSTM model has a RMSE of 2.2967, whereas LSTM-NN's RMSE is higher at 3.0948. For the case of minimum velocity (Min Vel. ): the LSTM model exhibits a MSE of 0.0381, whereas LSTM-NN has a higher MSE of 0.0789. The LSTM model records a RMSE of 1.9507, while LSTM-NN has a higher RMSE of 2.8091. The average of all parameters shows that: the LSTM model achieves an average MSE of 0.0467, whereas LSTM-NN has a higher average MSE of 0.0915. The LSTM model records an average RMSE of 2.1570, while LSTM-NN has a higher average RMSE of 3.0225. These results indicate that, in the damped system, the LSTM model generally outperforms LSTM-NN in terms of MSE and RMSE across all parameters. This suggests that the LSTM model provides more accurate predictions for the damped system compared to LSTM-NN. Figure 43: Min. displacement prediction results by LSTM and LSTM-NN models. Furthermore, the training time for both models can be observed in Figures 44 and 45. Based on the comparison of prediction accuracy and training time presented in Figures 44 and 45, it becomes evident that the LSTM model offers the advantages of shorter training time and high prediction accuracy. However, one drawback of LSTM models is that they may exhibit large fluctuations in training accuracy. On the other hand, the LSTM-NN model showcases stable training accuracy without significant ups and downs. However, when it comes to prediction accuracy, the LSTM-NN model falls short compared to the general LSTM model, particularly when dealing with multiple solutions.