# Improving PM2.5 Concentration Forecast with the Identification of Temperature Inversion
## 3 Proposed Methods
### Multivariate Regression  
As previously noted, we consulted meteorologists to manually partition the days in our collected data into two classes. One class (referred to as _Temp_inv_) included those with temperature inversion phenomena and the other class (referred to as _Normal_) contained those without temperature inversion. To take advantage of the temperature inversion factor in the estimation of PM\({}_{2.5}\) concentration, we used two different training datasets according to the classification result of the test day. If the test day was classified by the classifier as _Temp_inv_, the regression with the training dataset including all the records manually labeled by experts as _Temp_inv_ in 2016 was used. Otherwise (i.e., the test day was classified by the classifier as _Normal_), the regression with the training dataset which consisted of records of a short period of days preceding the test day was employed. The reason for adopting different lengths of training dataset is that the temperature inversion occasionally appears under particular meteorological phenomena and we collected sufficient such long-term instances in a year for obtaining a stable regression. For the test days without the temperature inversion phenomena, the relationship between its PM\({}_{2.5}\) concentration and meteorological features closely resembled that observed in short-term preceding days. The  
Figure 7: The learning curve of our CNN model with the training set and validation set.  
best size of the short-term training dataset is verified in our experiments and will be noted in Section 4.2.  
A multivariate linear regression function was trained with the designated training set according to the classification result (either _Temp_inv_ or _Normal_) of the test day. The regression function learned the relationship between the PM\({}_{2.5}\) concentration and the referenced meteorological variables. The form of the multivariate linear regression function is as follows.  
\[\hat{y}(t)=w_{0}+w_{1}x_{1}(t)+w_{2}x_{2}(t)+w_{3}x_{3}(t)+w_{4}x_{4}(t) \tag{1}\]  
where \(\hat{y}\) is the estimated PM\({}_{2.5}\) concentration, \(x_{1}\), \(x_{2}\), \(x_{3}\) and \(x_{4}\) indicate air pressure, temperature, relative humidity, and precipitation measured at time \(t\), respectively. The task was to learn the optimal regression coefficients (\(w_{i}\)) resulting in the least mean squared error (LMSE) between \(\hat{y}\) and the actual PM\({}_{2.5}\) concentration \(y\) over the duration time period of the adopted training dataset, \(\hat{v}iz\), \(\sum\limits_{t}(y(t)-\hat{y}(t))^{2}/\sum\limits_{t}1\).  
The learning task can be accomplished by applying a feasible optimization algorithm. In particular, the constriction-factor particle swarm optimization (CFPSO) [41] was deployed in this paper to obtain the optimal regression coefficients. Our CFPSO is as follows. A swarm of \(S\) particles is generated at random where particle \(i\) is represented as \(P_{i}=(w_{i0},w_{i1},w_{i2},w_{i3},w_{i4})\), \(i=1\), \(2\),..., \(S\). Hence, each particle is a candidate set of regression coefficients. The PSO improves the swarm intelligence by memorizing the best candidate set \(\mathit{pbest}_{i}\) seen by particle \(i\), and the best candidate set \(\mathit{gbest}\) seen by all the particles. The particles iteratively fly in the candidate set space by reference to \(\mathit{pbest}_{i}\) and \(\mathit{gbest}\) through each dimension \(j\) as follows.  
\[w_{ij}\leftarrow+\ 0.729\ \mathit{v}_{ij}+1.496\ \mathit{r}_{1j}\ (\mathit{pbest}_{ij}-w_{ij})+1.496\ \mathit{r}_{2j}\ (\mathit{gbest}_{j}-w_{ij}) \tag{2}\]  
where \(\mathit{r}_{1j}\) and \(\mathit{r}_{2j}\) are random real numbers drawn from \(\mathit{U}(0,1)\).  
The CFPSO algorithm terminated with a maximal number of iterations or when the best candidate set \(\mathit{gbest}\) of the entire swarm cannot be improved further after a sufficiently large number of iterations.