Random Forest vs LSTM: What Our Study Found
Air pollution, and PM2.5 concentration in particular, is a major public health concern in Indian cities. Predicting how it evolves from historical data is central to prevention and pollution-control planning. That's the subject of a research project carried out at KIIT University with two classmates, Obed Oduro Appiah and Mahgera Kisika, supervised by Ms. Prachi Vijayeeta (Soft Computing).
The objective and the data
Predict PM2.5 concentration from the "Air Quality Data in India (2015-2020)" dataset (Kaggle): PM2.5, PM10, NO2, CO and O3 concentrations, with temporal information, across several Indian cities. Before training anything, three preparation steps: missing values were replaced by the mean, outliers removed via the interquartile range method, then MinMax normalization applied to all variables.
Two models were then compared: Random Forest, a robust ensemble method for regression, and LSTM, a recurrent neural network specialized for time series.
The results, with the real numbers
| Model | RMSE | MAE |
|---|---|---|
| Random Forest | 15.23 | 10.45 |
| LSTM | 14.50 | 9.85 |
LSTM outperforms Random Forest on both metrics, confirming its stronger ability to capture long-term pollution trends: it learns the relationships between past and future values more finely than Random Forest, which treats each instant independently. Random Forest still stays competitive: faster to train, more interpretable, and well suited to quick predictions in contexts where computing power is limited.
The limitations, stated plainly
Two main limitations, honestly documented in the study: the absence of meteorological data (temperature, humidity, wind) in the dataset, which nonetheless plays a role in pollution variation, and the fact that results are trained and validated on India-specific data only, with no test of generalization to other regions.
What we take from it
The two models trade off differently: LSTM is smoother and better at long-term trends but underestimates sharp pollution spikes. Random Forest reacts faster to sudden changes but stays noisier. A more promising direction than picking a single model: a hybrid approach, Random Forest for immediate estimates, LSTM for longer-horizon forecasts.
The full source code is available on GitHub, and the complete study is published on Academia.edu.