# A Machine Learning-Based Method for Modeling TEC Regional Temporal-Spatial Map
## 2 Modeling
### Modeling Determination
#### 2.3.2 Modeling of Spatial Characteristics  
TEC shows the irregular and uneven distribution in space, and the existing ionospheric observation methods cannot achieve global observation. Therefore, we can obtain several observed samples from ionospheric observation stations in different regions. Furthermore, these observations can reflect part of the characteristics of ionospheric TEC spatial distribution and can predict the characteristics of TEC in the unknown regions accordingly. Considering the modeling data volume, the spatial distribution of observations, and the final purpose of modeling, we selected the modified Kriging interpolation method as the basic algorithm for spatial characteristics modeling. And then, it is further optimized according to the modeling data to obtain a better prediction result. The specific process is shown in Figure 7.  
Firstly, the covariance function is generated by using the regionalization variables that satisfy second-order stationary and eigen hypothesis. Then, we can determine the variation function using the ionospheric distance between the observation and reconstruction stations. Namely, we can estimate the spatial autocorrelation between TEC samples. Secondly, with the minimum variance as the standard, the weight coefficients of different observation stations are solved to determine the Kriging interpolation function. Finally, the determined Kriging interpolation function is used to calculate the TEC of the reconstruction stations, and the continuous TEC data plane is generated. In summary, the general expression of TEC spatial reconstruction based on modified Kriging [66] can be written as follows:  
\[\widetilde{\text{TEC}}=\sum\limits_{n=1}^{N}W_{n}\cdot\text{TEC}(n), \tag{5}\]  
Figure 7: The flowchart of TEC spatial interpolation. where TEC is the reconstruction value, \(N\) is the total number of modeling stations, TEC(\(n\)) is the TEC observation value of the \(n\)th observation station, and \(W_{n}\) is the weight coefficients of the \(n\)th observation station. To ensure the unbiased reconstruction result, the weight coefficients should meet the following requirements:  
\[\sum_{n=1}^{N}W_{n}=1, \tag{6}\]  
the weight coefficients are appropriately selected to make the reconstruction variance less than any linear combination of observation values. The minimum reconstruction variance is obtained by the appropriate variation function, whose equation is defined as:  
\[\gamma(d_{nj})=\frac{1}{2}E[\left(\text{TEC}(n)-\text{TEC}(j)\right)^{2}=\frac {1}{2}E[\left(\text{TEC}(n)-\text{TEC}(n+d_{nj})\right)^{2}, \tag{7}\]  
where \(d_{nj}\) is the ionospheric distance between the \(n\)th and \(j\)th station, TEC(\(n\)) is the observation at the \(n\)th station, and TEC(\(j\)) is the observation at the \(j\)th station whose distance is \(d_{nj}\) from the \(n\)th station. According to (7), the variation function reveals the variation pattern in the entire spatial region, and the commonly used variation functions are Gaussian, exponential, sinusoidal, and linear models [67]. In conclusion, we can use the following equation to determine the optimal weight coefficients:  
\[\sum_{n=1}^{N}\gamma(d_{nj})\times W_{n}=\gamma(d_{j0})-\Phi\,\ j=1,2\ldots N, \tag{8}\]  
where \(d_{nj}\) is the ionospheric distance between the \(n\)th and \(j\)th station, \(\gamma(d_{nj})\) is a variation function expressed as the ionospheric distance between the \(n\)th and \(j\)th station, \(d_{j0}\) is the ionospheric distance between the \(j\)th and reconstruction station, \(\gamma(d_{j0})\) is a variation function expressed as the ionospheric distance between the \(j\)th and reconstruction station, \(W_{n}\) is the weight coefficients of the \(n\)th station, \(N\) is the total number of modeling stations, and \(\Phi\) is the Lagrange multiplier. Combining (8) and the above, it can be seen that the variation function \(\gamma(d_{nj})\) of the TEC spatial reconstruction is the determination of the ionospheric distance between observation stations.