# Construction of Air Quality Level Prediction Model Based on STEPDISC-PCA-BP
## 2 Materials and Methods
### Methodology  
#### 2.2.1 Stepwise Discriminant Analysis (STEPDISC)  
In order to avoid the influence of irrelevant factors on the discriminant analysis results or the instability of discriminant results caused by too many factors, for the sample dataset with one classification label and several factors, STEPDISC performs hypothesis testing for each factor in turn to retain the factors with the strongest discriminatory power, and requires the factors to follow multivariate normal distribution within each category [12]. Assuming that there are \(k\) classes with \(m\) factors within each class, firstly, the statistical test is performed at the significance level \(\alpha\) for equality of the means of each factor component \(x_{i}\) (\(i=1\), \(2\), \(\ldots\), m) in the \(k\) classes, and the Wilks' \(\lambda\) value is calculated to measure the discriminative power of \(x_{i}\), which is equal to the ratio of the within-group deviation matrix to the total deviation matrix. The smaller the Wilks' \(\lambda\) value, the greater the difference between groups and the more important \(x_{i}\) is. Similarly, using Wilks' \(\lambda\) value to construct the \(F\) statistic, we further calculate \(p=P[F\geq F_{0}]\leq\alpha\) (\(F_{0}\) is the observed value of the \(F\) statistic); the larger the \(F\) value, the smaller the \(p\) value, the more significant the discriminative power of \(x_{i}\) which needs to be introduced into the discriminant function. Otherwise, there is no significant difference among \(x_{i}\) of each class, which cannot provide additional information for distinguishing between \(k\) classes, so \(x_{i}\) is not introduced. Secondly, every time a new factor with the strongest discriminative power is introduced into the discriminant function,  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Date** & **AP** & **AT** & **WS** & **SH** & **RH** & **DP** \\
**(0.1 hPa)** & **(0.1 °C)** & **(0.1 m/s)** & **(0.1 h)** & **(1\%)** & **(0.1 mm)** \\ \hline
11 January 2020 & 9047 & \(-122\) & \(16\) & \(77\) & \(78\) & \(0\) \\
12 January 2020 & 9042 & \(-124\) & \(19\) & \(78\) & \(79\) & \(3\) \\
13 January 2020 & 9066 & \(-167\) & \(14\) & \(78\) & \(76\) & \(0\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: _Cont._  
Figure 1: Bayannur city location (**a**) Map of China. (**b**) Map of Inner Mongolia. (**c**) Map of Bayannur city.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**PM2.5** & **PM10** & **SO2** & **NO2** & **CO** & **O3** \\
**(\(\mathbf{\mu}\)g/m3)** & **(\(\mathbf{\mu}\)g/m3)** & **(\(\mathbf{\mu}\)g/m3)** & **(\(\mathbf{\mu}\)g/m3)** & **(mg/m3)** & **(\(\mathbf{\mu}\)g/m3)** & **AQI** & **AQL** \\ \hline
39 & 83 & 57 & 27 & 0.58 & 43 & 67 & 2 \\
96 & 152 & 118 & 48 & 1.75 & 26 & 128 & 3 \\
67 & 128 & 85 & 36 & 1.27 & 46 & 97 & 2 \\ \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) \\
110 & 159 & 38 & 43 & 1.55 & 54 & 145 & 3 \\
145 & 228 & 38 & 52 & 2 & 38 & 187 & 4 \\
45 & 66 & 20 & 27 & 1 & 54 & 63 & 2 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Air pollutant factors sample during the same period.  
the old factors in the discriminant function are tested one by one and should be eliminated if their discriminative power becomes insignificant due to the introduction of new factors. Finally, the best subset of factors is gradually selected according to their discriminative power to distinguish \(k\) classes.