Giter Site home page Giter Site logo

data-science-kosta / forecasting-air-pollution-lstm-model-and-regression-trees-model Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 1.06 MB

Forecasting air pollution from given weather data. Two models were implemented: Regression Trees and LSTM model.

Python 43.61% Jupyter Notebook 56.39%
forecasting timeseries lstm-neural-network regression-trees air-pollution weather

forecasting-air-pollution-lstm-model-and-regression-trees-model's Introduction

Forecasting concetration of PM10 particles based on weather data

Building a complete Machine Learning pipeline for forecasting air pollution 12 hours ahead.

DATA:

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

MODELS:

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.

1. model:

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)

2. model:

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:

Loss

Final evaluation:

Loss

I could not reduce MAE more because the data is very noisy and same inputs are mapping to different outputs

forecasting-air-pollution-lstm-model-and-regression-trees-model's People

Contributors

kosta-jo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.