Machine Learning Calibration of Low-Cost Sensor PM<sub>2.5</sub> data
Irfan Yaqoob, Vijay Kumar, Shafique Ahmad Chaudhry
Abstract
Recent Advancements in low-cost air quality sensors have significantly expanded their potential applications in local air quality and environment monitoring. In contrast to regulatory PM<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2.5</inf> monitors, these low-cost sensors are more affordable, portable, and easier to maintain. This enables ambient air quality monitoring with higher spatio-temporal resolution. However, the accuracy and reliability of low-cost sensors are generally inferior to those of regulatory monitors, and their performance varies across different environments and sensor technologies. Therefore, calibrating data from low-cost sensors is crucial to mitigate systematic biases and errors, thereby making it usable for informed policy-making decisions. This study builds and evaluates the performance of various machine-learning models to calibrate PM<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2.5</inf> data from Purple Air(PA) sensors. The calibration models are developed using the PM<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2.5</inf> concentration, temperature (T), and relative humidity (RH) of the PA, with PM<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2.5</inf> concentration measurements from Federal Monitors. We have evaluated the performance of various models including Linear Regression (LR), Random Forest (RF), Gradient Boosting (GB), k-nearest Neighbors (KNN), and Neural Networks (NN) using several metrics, including the coefficient of determination (R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup>), root mean square error (RMSE), and mean absolute error (MAE). Spatial validation of the model is conducted using leave-one-location-out (LOLO) and Leave-Multiple-Locations-Out (LMLO) methods. Furthermore, we utilized k-fold cross-validation methods to ensure robust evaluation of the model performance across different locations and times. The Neural Network outperforms all the remaining models with an R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> of 0.88, a root mean squared error (RMSE) of 1.75 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>), and a mean absolute error (MAE) of 3.13 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>). In comparison, the Random Forest model achieved an R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> of 0.87, an RMSE of 1.84 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>), and a mean squared error (MSE) of 3.39 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>). Gradient Boosting showed an R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> of 0.86, an RMSE of 1.89 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>), and an MSE of 3.60 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>). The K-Nearest Neighbors (KNN) model resulted in an R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> of 0.83, an RMSE of 2.12 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>), and an MSE of 4.49 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>). Lastly, the Linear Regression model achieved an R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> of 0.83, an RMSE of 2.13 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>), and an MSE of 4.57 (µg/m<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">3</sup>).