## 3 Model Construction
### Model Evaluation Indicators  
This paper focus not only on the accuracy of earthquake prediction, but also on the missed prediction and false prediction. Therefore, this paper utilizes the indicators of PA, PP, RP, PN, and RN to evaluate the goodness of the model. The relevant indicators are explained separately below. If these indicators get closer to 1, it indicates that the prediction effect of the model is better. The threshold is set to 0.5, the region is identified to have an earthquake if the risk value exceeds threshold. Based on this judgment condition, the number of predicted earthquakes and predicted no-earthquakes can be counted. According to the prediction results, the indicators can be calculated to illustrate the effects of the prediction model.  
Precision All (PA) refers to the total accuracy, the number of correct prediction results divided by the total number of predictions.  
\[\text{PA}= \frac{\text{TP}+\text{TN}}{\text{TP}+\text{FN}+\text{FP}+\text{TN}} \tag{24}\]  
Precision positive (PP) is the accuracy of predicting earthquakes, the number of correct prediction results divided by the number of predicted earthquakes.  
\[\text{PP}= \frac{\text{TP}}{\text{TP}+\text{FP}} \tag{25}\]  
Recall positive (RP) is the recall rate, the number of correct prediction results divided by the total number of actual earthquakes.  
\[\text{RP}= \frac{\text{TP}}{\text{TP}+\text{FN}} \tag{26}\]  
Precision negative (PN) is the accuracy of predicting no-earthquakes, the number of correct prediction results divided by the total number of predicted no-earthquakes.  
\[\text{PN}= \frac{\text{TN}}{\text{FN}+\text{TN}} \tag{27}\]  
Recall negative (RN) is the recall rate of no-earthquakes, the number of correctly prediction results divided by the total number of actual no-earthquakes.  
\[\text{RN}= \frac{\text{TN}}{\text{FP}+\text{TN}} \tag{28}\]  
where TP is true positive, FP is false positive, TN is true negative, and FN is false negative.  
The magnitude prediction, epicenter latitude and longitude prediction belong to the ternary regression task. This paper uses two vital indicators--magnitude of absolute mean deviation (mag_mae) and distance average deviation (distance_average)--to evaluate the effect of the model which focuses on the absolute deviation of magnitude prediction and the distance deviation of the epicenter prediction. The two related indicators are explained below:  
Magnitude of absolute mean deviation (mag_mae) represents the average of the absolute deviation between the predicted magnitude and the actual magnitude. It can reflect the accuracy of the magnitude prediction. The calculation method is defined as follows:  
\[\text{mag\_mae}\ =\ \frac{1}{m}\sum_{i=1}^{m}|y_{i}\ -\ y_{i}|, \tag{29}\]  
where \(y_{i}\) represent the actual magnitude and \(\hat{y}_{i}\) represents the predicted magnitude.  
Distance average deviation (distance_average) represents the mean value of the difference between the actual and predicted positions of the epicenter. It can reflect the accuracy of the epicenter prediction. The calculation method is defined as follows:  
\[\text{distance\_average}=\frac{1}{m}\sum_{i=1}^{m}\text{geodesic}((y_{i\_lat}, y_{i\_lon}),\ (\hat{y}_{i\_lat},\ \hat{y}_{i\_lon})), \tag{30}\]  
where \(y_{i\_lat}\), \(y_{i\_lon}\) represents the actual epicenter latitude and longitude, respectively and \(\hat{y}_{i\_lat}\), \(\hat{y}_{i\_lon}\) represents the predicted epicenter latitude and longitude, respectively.