# A Model-Assisted Combined Machine Learning Method for Ionospheric TEC Prediction
## 2 Materials and Methods
### Methods
#### 2.2.2 TEC Prediction Based on Statistical Machine Learning  
Fourier expansion is known to be useful in characterizing periodic waveforms. Because TEC is inherently diurnal, Fourier analysis is superior to other ionospheric modeling methods in building empirical models of TEC predictions. In particular, the Fourier function was used to model the ionospheric TEC diurnal variation, with a period of 24 h, as shown in the following function [12]:  
\[\text{TEC}(\lambda,\varphi,m,p,ssn,T)=\sum_{n=0}^{N}[a_{n}(\lambda,\varphi,m,p, ssn)\cos(nT)+b_{n}(\lambda,\varphi,m,p,ssn)\sin(nT)], \tag{2}\]  
where \(\lambda\) is the geographical latitude, \(\varphi\) is the geographical longitude, \(m\) is the month, \(p\) is the solar radio wave flux of 10.7 cm wavelength, \(ssn\) is the number of sunspots, \(T\) is the given time, expressed as between \(-180^{\circ}\) and \(180^{\circ}\), \(N\) is the maximum number of harmonics used to represent the diurnal variation and can be determined by the regression analysis, \(n\) (\(n\) = 1, 2,..., \(N\)) is the harmonic number, \(a_{n}\) and \(b_{n}\) are Fourier coefficients related to geographic coordinates and solar activity parameters.  
For the given geographical location in Athens, Greece (\(38^{\circ}02^{\prime}\)N, \(23^{\circ}44^{\prime}\)E, UTC/GMT + 2 h), the main factors affecting TEC are time and solar activity level. One of the determinants of solar activity level is F10.7, which is mainly determined by the corona and the upper layer of the chromosphere. Another determinant is SSN, which is influenced by the photosphere and the chromosphere. Therefore, we can predict TEC from solar cycle variation parameters and time parameters (year, semi-year, and month). The prediction function can be written as a harmonic function [12]:  
\[\text{TEC}(m,p)=\sum_{k=0}^{K}\sum_{j=0}^{J}\biggl{[}c_{k,j}^{p}p^{j}\cdot\cos \biggl{(}\frac{2\pi\text{km}}{12}\biggr{)}+s_{k,j}^{p}p^{j}\cdot\sin\biggl{(} \frac{2\pi\text{km}}{12}\biggr{)}\biggr{]}, \tag{3}\]  
Figure 4: Data flow diagram of the MMAdapGA-BP-NN prediction model.  
\[\text{TEC}(m,ssn)=\sum_{k=0}^{K}\sum_{j=0}^{J}\biggl{[}c_{k,j}^{ssn}ssn^{j}\cdot \cos\biggl{(}\frac{2\pi\text{km}}{12}\biggr{)}+s_{k,j}^{ssn}ssn^{j}\cdot\sin \biggl{(}\frac{2\pi\text{km}}{12}\biggr{)}\biggr{]}, \tag{4}\]  
where \(p\) is the average F10.7 over 12 months (unit is \(10^{-22}/\text{W}/\text{m}^{-2}/\text{Hz}^{-1}\)); \(ssn\) is the average SSN over 12 months; \(m\) is the month; \(K\) represents the upper limit of annual, semi-annual, seasonal, and monthly cycles; \(J\) represents the upper limit of solar cycles. \(K\) and \(J\) can be determined by regression analysis. In addition, the coefficients \(c_{k,j}^{p},s_{k,j}^{p},c_{k,j}^{\text{ssn}},s_{k,j}^{\text{ssn}}\) in the formula were determined by the least square fitting method.  
Either an empirical ionospheric model or a principle-based physical model is derived from observations. In exactly the same way, the ionospheric parameters of the above harmonic functions can be determined from observations. The root-mean-square error (RMSE) could be easily estimated with the least squares regression analysis for TEC [12,16]. The calculation shows that the maximum harmonic number N in Equation (2) is up to 11 in the above model to ensure the highest precision and robustness. Similarly, when the regression order \(J=2\) and \(K=2\) in Equations (3) and (4), the calculated RMSE of TEC is smaller. It can be seen that it has better convergence and stronger robustness.