# Improving PM2.5 Concentration Forecast with the Identification of Temperature Inversion
## 3 Proposed Methods
### Feature Engineering  
To select effective features for classifying the days into two classes, i.e., the days with and without temperature inversion, we consulted meteorologists to learn about commonly seen meteorological phenomena when temperature inversions arise. The prevailing phenomena are as follows. We usually see relatively high temperature around noon and relatively low temperature at night. The difference between the temperature at noon and at night is large as compared to other days in the same season. The correlation between the phenomena and the temperature inversion is more significant when the relative humidity is high and the wind is calm at night and there is no precipitation. However, the relative highs and lows for the meteorological measures vary from month to month. We thus applied k-means algorithm in Scikit-learn to automatically label the meteorological data into three classes according to individual monthly value ranges. For each of the meteorological measures (temperature, relative humidity, and wind speed) and PM\({}_{2.5}\) observations, we collected the hourly data within the same month and the k-means algorithm was used to label the hourly data for each measure into three classes: high (colored in red), middle (uncolored), and low (colored in green). However, the meteorological patterns depicted by meteorologists are weak. For example, the time period for measuring the noon temperature could be flexible. We may see relatively high temperature span through 11:00 a.m. to 2:00 p.m., or from 12:00 a.m. to 3:00 p.m. Both phenomena can be considered as relatively high noon temperature. The same situation applies to other meteorological patterns. In order to obtain ground-truth values of temperature inversion, we manually labeled each day as being with and without temperature inversion according to these weak patterns.  
Figure 4 shows the data labeling for two plausible examples of temperature inversion phenomena. The left example is from 2016, the right one 2017. Both examples show that the temperature around noon was relatively high and started to cool down in the evening, and reached its monthly low range in the midnight. An opposite phenomena was observed for relative humidity, which showed a monthly low around noon and monthly high at night. The PM\({}_{2.5}\) collectively concentrated in the afternoon due to temperature inversion and the conditions of calm wind at night and no precipitation barricade the PM\({}_{2.5}\) concentrations to disperse. The PM\({}_{2.5}\) value reached its monthly highs before evening and usually stayed in this high class for more than eight straight hours. Conspicuously, the previously-noted phenomena about temperature, relative humidity, wind speed, and precipitation are salient features for classifying temperature inversion.  
Figure 3: The investigated site. (**a**) Location of Puli township and two potential external pollution sources. (**b**) Geography of Puli township and the Taiwan EPA supersite (located at the Puli middle school).  
We further divided the days in 2016 and 2017 into two groups, the days with and without the noted meteorological phenomena, respectively. For each group, the mean hourly PM\({}_{2.5}\) concentration was evaluated. It is seen in Figure 5 that, for both years, the mean hourly PM\({}_{2.5}\) value with the noted phenomena was higher than that without the meteorological phenomena. The difference between the mean values of the two groups is more significant after evening and before dawn. This reveals that the two groups had very different conditions for raising PM\({}_{2.5}\) concentrations. We believe that if the two groups of days were separately analyzed, the prediction of PM\({}_{2.5}\) concentrations would be more accurate.