# Evaluating Machine Learning and Remote Sensing in Monitoring NO2 Emission of Power Plants
## 3 Materials and Methods
### Preprocessing & Post-Processing
#### 3.3.5 Dataset Preparation  
Scaling was the first step taken with the data across all ML models in both scenarios. All features in the input variables were scaled on a (0, 1) scale for consistency and performance of the ML models. The scaling prevents giving more weight to higher-range features while less to lower-range features. Both the independent and dependent features were scaled. The predictors and target features for both the train and test sets were then extracted using a 66% training split. Additionally, a datetime string was associated with the CSV file for each day available in the dataset throughout the year. This was split into three separate columns as the ML models cannot parse date strings as input. We transformed the date column numerically into \"dayofweek\", \"dayofmonth\", and \"dayofyear\".  
The second scenario included an additional step in which all power plant NO\({}_{2}\) emissions were averaged by date. The models would not learn since the dates in a dataset containing all power plants would always overlap. The best approximation of NO\({}_{2}\) emissions from all plants was produced by grouping the dataset by date. Because grouping by facility ID removes the dataset's time series element, resulting in an inaccurate portrayal of emissions over time, it was not used. The final output of both scenarios' datasets is displayed in Tables 1 and 2. Figures 2-4 visualize the data for the first scenario. Figure 2 shows the data  
Figure 2: Actual values throughout the year of different important features for the single power plant (Alabama) dataset. (**a**) EPA NO\({}_{2}\) value by day in 2019; (**b**) TROPOMI NO\({}_{2}\) value by day in 2019; (**c**) MODIS  
MCD19A2 blue band AOD at 0.47 \(\upmu\)m 2019 value by day in 2019; (**d**) MERRA-2 daily surface temperature value by day in 2019; (**e**) MERRA-2 daily surface wind speed value by day in 2019; (**f**) MERRA-2 daily bias-corrected precipitation value by day in 2019; (**g**) MERRA-2 daily cloud fraction value by day in 2019; (**h**) MERRA-2 weekly surface temperature value by day in 2019; (**i**) MERRA-2 weekly surface wind speed value by day in 2019; (**j**) MERRA-2 weekly bias-corrected precipitation value by day in 2019; (**k**) MERRA-2 weekly cloud fraction value by day in 2019.  
Figure 3: Distributions of each feature used for training with 10 bins for the single power plant (Alabama) dataset. (**a**) EPA NO\({}_{2}\) distribution in 2019; (**b**) TROPOMI NO\({}_{2}\) distribution in 2019; (**c**) Number of day distribution in year 2019; (**d**) Number of week distribution in 2019; (**e**) Number of month distribution in 2019; (**f**) MODIS MCD19A2 blue band AOD at 0.47 \(\upmu\)m 2019 distribution; (**g**) MERRA-2 daily surface temperature distribution in 2019; (**h**) MERRA-2 daily surface wind speed distribution in 2019; (**i**) MERRA-2 daily bias-corrected precipitation distribution in 2019; (**j**) MERRA-2 daily cloud fraction distribution in 2019; (**k**) MERRA-2 weekly surface temperature distribution in 2019; (**l**) MERRA-2 weekly surface wind speed distribution in 2019; (**m**) MERRA-2 weekly bias-corrected precipitation distribution in 2019; (**n**) MERRA-2 weekly cloud fraction distribution in 2019.  
Figure 4: Correlation plot showing the relationship between each feature for the single power plant (Alabama) dataset.  
Figure 5: Data and ML flow.  
In some cases (e.g., the LSTM model), additional steps were taken relevant to the model setup. These are discussed in further detail in each model's section.