# Evaluating Machine Learning and Remote Sensing in Monitoring NO2 Emission of Power Plants
## 3 Materials and Methods
### Model Training Error Metrics  
Machine learning approximates a function representing the correlation between inputs and output data. This applies to both linear and non-linear data characteristics. In this study, we used various machine learning models to be trained on the non-linear nature of our data and the relationships between the inputs and output. Measuring the accuracy of the model prediction in the case of regression problems with non-linear data involves standard metrics that measure the performance of the ML models.  
Mean absolute error measures the errors between paired observations. Although it is the least looked at metric for measurement, it is a good indicator for understanding the error difference between predicted and actual observations. _MAE_ is insensitive to the direction of errors, and lower values are better (See Equation (1)).  
\[MAE=\left(\frac{1}{n}\right)\sum_{i=1}^{n}\left|Y_{i}-X_{i}\right| \tag{1}\]  
where \(n\) is the number of items, and \(\sum\) is the summation notation, and \(\left|\,Y_{i}-X_{i}\,\right|\) are the difference of absolute errors of predicted EPA NO\({}_{2}\) minus observed EPA NO\({}_{2}\) values.  
Mean squared error measures the average square of errors between the estimated (predicted) values and actual values. It is a risk function that corresponds to the expected values of the squared loss. This metric looks at how close the regression line is to actual values, and lower values are better (See Equation (2)).  
\[MSE=\frac{1}{n}\sum_{i=1}^{n}\left(Y_{i}-\hat{Y}_{i}\right)^{2} \tag{2}\]  
where \(n\) is the number of items, \(\sum\) is the summation notation, \(Y_{i}\) is observed EPA NO\({}_{2}\) values, and \(\hat{Y}_{i}\) is predicted EPA NO\({}_{2}\) values. It is one of the primary metrics used for model performance in this study.  
Root mean squared error was utilized as an additional metric. It is a measure of the error rate by the square root of _MSE_. _RMSE_ is also insensitive to the direction of errors, and lower values are better (See Equation (3)).  
\[RMSE=\sqrt{\left(\frac{1}{n}\right)\sum_{i=1}^{n}\left(Y_{i}-\hat{Y}_{i}\right)} \tag{3}\]  
where \(\hat{Y}_{i}\) is the predicted EPA NO\({}_{2}\) values, \(Y_{i}\) is observed EPA NO\({}_{2}\) values, \(n\) is number of items, and \(\sum\) is the summation notation.  
The residual standard error measures the accuracy of nonlinear regression models. Similar to the standard deviation, it calculates the average distance of the actual values from the regression line. Additionally, _RSE_ is insensitive to the direction of errors. Lower RSE values mean better results. The residual standard error is defined below (See Equation (4)).  
\[RSE=\sqrt{\frac{\sum_{i=1}^{n}\left(Y_{i}-\hat{Y}_{i}\right)^{2}}{df}} \tag{4}\]  
where \(\sum\) is the summation notation. \(Y\) is the observed EPA NO\({}_{2}\) value. \(\hat{Y}\) is the predicted EPA NO\({}_{2}\) value. \(df\) is the degrees of freedom, calculated as the total number of observations-total number of model parameters.  
The error rate was one of the primary metrics used for model performance in this study. This metric calculates the percentage error rate for all average error distances between actual and predicted values (See Equation (5)).  
\[\text{Error Rate }=\left(\frac{RMSE}{\overline{Y}}\right) \tag{5}\]  
where the percentage error rate is the result by dividing _RMSE_ using \(\overline{Y}\) which is the mean of target actual values for the test dataset. Error rate provides a comprehensive measurement of predictive performance with lower values being better.