# Regional Geomagnetic Field Modeling Based on Associated Legendre Polynomials
## 3 Data and Modeling Results
### Model Accuracy Evaluation Analysis
The obtained results are illustrated in Figure 6a. As shown in Figure 6a, the comprehensive evaluation index steadily decreased as the truncation level increased, reaching a minimum value of 0.8749 at the 76 th degree. Beyond this point, the index began to increase gradually. Based on this analysis, the optimal truncation level for the LPM was identified as the 76 th degree, corresponding to the outlier number of 43 points and representing approximately 2.65% of the total number of points. As shown in Figure 5b, the trend in RMSE of the TPM across truncation levels can be categorized into three phases: a slow decrease in the initial phase, followed by local stabilization and, finally, a sharp increase. For truncation levels lower than 42, the RMSE gradually decreased, reaching a minimum value of 16.9 nT at degree 42. Between degrees 42 and 51, the RMSE remained relatively stable, fluctuating within a range of approximately 1 nT. However, from degree 52 onward, the RMSE increased dramatically, exceeding 400 nT at degree 103. Simultaneously, the change in the number of outliers exhibited a specific pattern. The number of outliers exhibited continuous fluctuations within the first 7 degrees. The number of outliers then increased rapidly from the 8 th to the 90 th degree. After the 90 th degree, although the number of outliers continued to increase in general, significant fluctuations occurred. Considering the influences of the RMSE and the number of outliers on the overall model, the results obtained when applying the comprehensive evaluation index formula (Equation (9)) are shown in Figure 6b. As illustrated in Figure 6b, the comprehensive evaluation index decreased steadily as the truncation level increased, reaching a minimum value of 11.9086 at the 42 nd degree. After this point, the index increased rapidly, reaching a value of 4507.089 at the 112 th degree. Thus, the optimal truncation level of the TPM was determined to be the 42 nd degree. Next, we compared the performance of the R\(-\)ALPOLM, LPM, and TPM at their respective optimal truncation levels. Table 3 presents the statistics of the predicted data for the three models. The results indicate that the maximum error value of the predicted data for the R\(-\)ALPOLM of 83 rd degree was 32.60 nT, the minimum error was \(1.57\times 10^{-4}\) nT, the average error was 1.16 nT, and the RMSE was 3.21 nT, which were the lowest among the  
Figure 4: RMSE and running time of the three models at different degrees: (**a**) RMSE. (**b**) Running time. three models for all parameters. The R\(-\)ALPOLM exhibited the lowest RMSE among the models, thereby highlighting its superior prediction accuracy. The predicted data for the 76 th degree LPM showed similar values for the maximum, minimum, and the average error values, compared with the R\(-\)ALPOLM; however, the RMSE value for the LPM reached 5.00 nT, indicating comparable stability, although it was slightly inferior to that of the R\(-\)ALPOLM. In contrast, the predicted values for the 42 nd degree TPM differed notably from those of the first two models, particularly with the RMSE reaching 12.76 nT. This was significantly higher than those for the first two models, highlighting a disadvantage in terms of its prediction accuracy. Figure 7 illustrates the two-dimensional (2D) images of local geomagnetic anomalies constructed by three models at their respective optimal truncation levels. The observations and analyses indicate that the 2D images generated by each model exhibit a high degree of consistency with the original geomagnetic anomaly data in terms of overall color distribution, effectively capturing the general characteristics of the geomagnetic anomaly field. Figure 5: Relationship between the number of outliers and RMSE with truncation level for: (**a**) The LPM. (**b**) The TPM. Figure 6: Optimal truncation level for the (**a**) LPM and (**b**) TPM.