Handling Missing Air Quality Data Using Bidirectional Recurrent Imputation for Time Series and Random Forest: A Case Study in Mexico City
Accurate imputation of missing data in air quality monitoring is essential for reliable environmental assessment and modeling. This study compares two imputation methods, namely Random Forest (RF) and Bidirectional Recurrent Imputation for Time Series (BRITS), using data from the Mexico City air quality monitoring network (2014–2023). The analysis focuses on stations with less than 30% missingness and includes both pollutant (CO, NO, NO2, NOx, SO2, O3, PM10, PM2.5, and PMCO) and meteorological (relative humidity, temperature, wind direction and speed) variables. Each station’s data was split into 80% for training and 20% for validation, with 20% artificial missingness. Performance was assessed through two perspectives: local accuracy (MAE and RMSE) on masked subsets and distributional similarity on complete datasets (Two One-Sided Tests and Wasserstein distance). RF achieved lower errors on masked subsets, whereas BRITS better preserved the complete distribution. Both methods struggled with highly variable features. On complete time series, BRITS produced more realistic imputations, while RF often generated extreme outliers. These findings demonstrate the advantages of deep learning for handling complex temporal dependencies and highlight the need for robust strategies for stations with extensive gaps. Enhancing the accuracy of imputations is crucial for improving forecasting, trend analysis, and public health decision-making.
Authors
- Julio César Pérez-Sansalvador (ORCID: https://orcid.org/0000-0002-2656-3659)
- Lorena Díaz‐González (ORCID: https://orcid.org/0000-0003-1577-5629)
- N. Lakouari (ORCID: https://orcid.org/0000-0002-7180-1038)
- Ingrid Trujillo-Uribe
Institutions
- National Institute of Astrophysics, Optics and Electronics (MX)
- Secretaría de Ciencia Tecnología e Innovación (MX)
- Universidad Autónoma del Estado de Morelos (MX)
Publication Details
- Journal
- AI
- Published
- 2025-09-01
- DOI
- https://doi.org/10.3390/ai6090208
- Primary Topic
- Energy Load and Power Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Instituto Nacional de Astrofísica, Óptica y Electrónica