Building a complete Machine Learning pipeline for forecasting air pollution 12 hours ahead.
The data is collected from 8 different stations in Macedonia. Links from where the data was collected: https://pulse.eco/restapi https://darksky.net/dev/docs
2 Models were built. In the first model each station has its own predictor, and in the second model (LSTM model) datasets are concatenated and universal predictor is made.
Preprocessing - removing or interpolating missing values, transforming categorical data, dropping redundant features.
Feature selection - creating lag, seasonal and statistical features and dropping features that do not have effect on air pollution.
Model selection - 3 models were built for each station (Linear regressor, Extra treees regressor, XGBoost regressor)
Preprocessing - removing or interpolating missing values, transforming categorical data, dropping redundant features.
Feature selection - creating statistical and seasonal features and dropping features that do not have effect on air pollution, concatenating datasets and handling different categorical features.
Model selection - For creating lag features previous 7 days were observed, for each hour separately, by the LSTM layer. Data is splitted, schuffled, scaled and reshaped to have proper shape for LSTM layer. The network is trained on Google colaboratory.
Loss:
Final evaluation:
I could not reduce MAE more because the data is very noisy and same inputs are mapping to different outputs