## 4 Results
### Forecast Results
#### 4.2.2 Magnitude Prediction  
In the magnitude prediction process, the same 22 feature parameters were utilized as input to the LSTM model, which then outputted the maximum magnitude of the next forecast window. The training set, validation set, and test set were divided in an 8:1:1 ratio. Given the small size of the data set, we needed to be cautious of overfitting. Therefore, we performed multiple optimizations using the validation set and determined the optimal configuration of the LSTM model. Specifically, the number of hidden layers was set as 1, the number of neurons as 16, the initial learning rate as 0.01, and the number of epochs as 200, to prevent overfitting. Pandas and NumPy were also called here to read the dataset file and generate the corresponding array, respectively. Torch was imported to build the LSTM model. All figures were obtained using matplotlib. In the data preprocessing stage, the MinMaxScaler function was utilized to normalize the data, which was then fed into the model for training. The denormalized prediction results were obtained after the model had made its predictions. The MinMaxScaler function  
Figure 7: ROC curves of the large earthquake occurrence classification using SVM, DT, LR, RF. of sklearn was called in this section. The magnitude prediction results are presented in Figures 8 and 9. Figures 8 and 9 present the outcomes of the maximum magnitude prediction. The LSTM model can effectively capture the temporal variations of the maximum magnitudes in the training and validation sets, with most of the predicted magnitudes oscillating within a range of \(\pm\)0.5 of the observed magnitude. However, on the test set, the model can only grasp the trend of the magnitude and tends to overestimate the maximum magnitude for actual events with magnitude \(<\)= 5.0 and underestimate the maximum magnitude for actual events with magnitude \(>\)= 6.0. This suggests that although the LSTM model can detect the general pattern, it tends to produce oversimple predictions for the maximum magnitude. Figures 10 and 11 illustrate the dispersion of errors using boxplot and histogram. Notably, the error distribution of the training set is centered around 0, whereas the error distribution of the test set is much wider, centered around 0. Figure 10: Boxplot of the errors of training set, validation set, and test set. Figure 9: Comparison of the predicted and observed maximum magnitudes. The black dots, red triangles, and blue crosses represent test, validation, and training dataset, respectively. Table 3 presents the evaluation indicators of our model and compares them with those of other studies. The results are better than that of [36], but worse than [37]. The reasons for these differences will be discussed in the Section 5. To evaluate the importance of different features, the permutation importance method was used. This method measures the importance of features by calculating the increase of model prediction error after shuffling the time series of each feature. The advantage of this method is that it can compare the importance of different features and save more time compared to other methods. Figure 12 shows the feature importance of our model, where the length of the bar chart represents the error of the model after shuffling the order. Longer bars indicate more important features, while the orange line represents the MAE of the model as the reference line. Figure 12 reveals that nearly all the features used have a positive effect on the model's performance. Among them, b_std_mlk, x7_mlk, and T_elaps7 are less important, while dM_mlk, x7_lsq, N.O., and T_elaps6 are the top four most important features. These results demonstrate that magnitude deficit, probability of earthquake occurrence, number of earthquakes, and the days since the last large earthquake are crucial factors for earthquake magnitude prediction, which is consistent with physical understanding.