Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fork123aniket/multivariate-time-series-forecasting-for-air-pollution-using-lstms
Implementation of Multivariate Time Series Forecasting for Air Pollution using LSTMs in Keras
https://github.com/fork123aniket/multivariate-time-series-forecasting-for-air-pollution-using-lstms
keras keras-models lstm lstm-model lstm-neural-networks tensorflow tensorflow-tutorials time-series time-series-analysis time-series-forecasting time-series-prediction
Last synced: 5 days ago
JSON representation
Implementation of Multivariate Time Series Forecasting for Air Pollution using LSTMs in Keras
- Host: GitHub
- URL: https://github.com/fork123aniket/multivariate-time-series-forecasting-for-air-pollution-using-lstms
- Owner: fork123aniket
- License: mit
- Created: 2022-05-20T08:02:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T12:00:19.000Z (over 1 year ago)
- Last Synced: 2024-10-10T08:40:54.547Z (29 days ago)
- Topics: keras, keras-models, lstm, lstm-model, lstm-neural-networks, tensorflow, tensorflow-tutorials, time-series, time-series-analysis, time-series-forecasting, time-series-prediction
- Language: Python
- Homepage:
- Size: 1.11 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multivariate Time Series Forecasting for Air Pollution using LSTMs
This repository provides the code to develop an ***LSTM*** model for ***multivariate time series forecasting*** to predict the pollution at the current hour ***(t)*** given the pollution measurement and weather conditions at the prior time step.
## Requirements
- `numpy`
- `pandas`
- `matplotlib`
- `scikit-learn`
- `keras`
## Usage
### Data
- A dataset that reports on the weather and the level of pollution each hour for five years is being used here that includes the date-time, the pollution called PM2.5 concentration, and the weather information including dew point, temperature, pressure, wind direction, wind speed and the cumulative number of hours of snow and rain.
- Please ensure to save `raw.csv` file given in the `Data` folder in the main data directory and run `Data.py` which preprocesses the data, appropriate for stabilized training of the ***LSTM*** model, and then creates a new data file named `pollution.csv` in the same directory.
### Model Building and Training
- To train the ***LSTM*** model on merely single previous time step window setting and test it in the same setting, run `Train_On_Single_Lag_Timesteps.py`
- To train the ***LSTM*** model on multiple previous time steps, run `Train_On_Multiple_Lag_Timesteps.py`
- All hyperparameters to control training and testing of the model in single as well as multiple time step window settings are provided in their respective `.py` files.
- The average and validation set losses are printed after every epoch.
## Results
| Line Plots of Air Pollution Time Series | Performance of the *LSTM* model on Single Lag Timesteps Example | Performance of the *LSTM* model on Multiple Lag Timesteps Example |
| ------------------------- |:----------------------------:|:---------------------------:|
| ![alt text](https://github.com/fork123aniket/Multivariate-Time-Series-Forecasting-for-Air-Pollution-using-LSTMs/blob/main/Images/1.PNG) | ![alt text](https://github.com/fork123aniket/Multivariate-Time-Series-Forecasting-for-Air-Pollution-using-LSTMs/blob/main/Images/2.PNG) | ![alt text](https://github.com/fork123aniket/Multivariate-Time-Series-Forecasting-for-Air-Pollution-using-LSTMs/blob/main/Images/3.PNG) |