Giter Club home page Giter Club logo

laughingwithu / time-series_imaging_forecasting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simeonedef/time-series_imaging_forecasting

0.0 1.0 0.0 197.86 MB

In this project we have explored the use of imaging time series to enhance forecasting results with Neural Networks. The approach has revealed itself to be extremely promising as, both in combination with an LSTM architecture and without, it has out-performed the pure LSTM architecture by a solid margin within our test datasets.

License: GNU General Public License v3.0

Python 100.00%

time-series_imaging_forecasting's Introduction

Imaging Time-Series to improve NN forecasting

Stefano d'Apolito, Francesco Forcher, Simeone de Fremond, Alper Karaaslan

In this project we have explored the use of imaging time series to enhance forecasting results with Neural Networks. The approach has revealed itself to be extremely promising as, both in combination with an LSTM architecture and without, it has out-performed the pure LSTM architecture by a solid margin within our test datasets.

Python 3.6 License GPL

Installation and requirements

  • Python 3.6
  • Tensorflow 2
  • Tensorboard
  • Keras
  • H5py
  • Matplotlib
  • Numba
  • Numpy
  • Pandas
  • Pyts
  • Scipy & Sklearn
  • Tqdm

To install all requirements run:

pip install -r requirements.txt

If you run into some issues, make sure that matplotlib is already installed on your machine.

Usage example

Our models have been implemented for two generated datasets and an additional real life dataset, for which trained models are provided. The logs, predictions, and model weights can all be found in their appropriate folders in the final_results directory.

Trend + Seasonality + Noise dataset

To run the training and testing of the model:

python script\example_time_series.py --model=model (--hw) (--no_cb)

where model can be:

  • "Conv_LSTM"
  • "Conv_MLP"
  • "LSTM" (in this case, the value of hw does not matter)

if --hw is supplied: the chosen model will be combined with Holt-Winter otherwise it will be just pure NN if --no_cb is supplied: no callbacks will be recorded, only a csv file containing predictions will be recorded at the end

Example: python script\example_time_series.py --model="Conv_LSTM" --hw
(Warning:  because of the number of datapoints we train, it may take up to 25Gb of RAM)

To only get the results of our experiments run:

python script\example_time_series_results.py

Lorenz attractor dataset

To run the training and testing of the model:

python script\example_lorenz.py --model=model (--hw) (--no_cb)

where model can be:

  • "Conv_LSTM"
  • "Conv_MLP"
  • "LSTM" (in this case, the value of hw does not matter)

if --hw is supplied: the chosen model will be combined with Holt-Winter otherwise it will be just pure NN if --no_cb is supplied: no callbacks will be recorded, only a csv file containing predictions will be recorded at the end

Example: python script\example_lorenz.py --model="Conv_LSTM" --hw
(Warning:  because of the number of datapoints we train, it may take up to 25Gb of RAM)

To only get the results of our experiments run:

python script\example_lorenz_results.py

Dowjones dataset

To run the training and testing of the model:

python script\Dowjones_Executer.py --model=model (--hw) (--no_cb)

where model can be:

  • "Conv_LSTM"
  • "Conv_MLP"
  • "LSTM" (in this case, the value of hw does not matter)

if --hw is supplied: the chosen model will be combined with Holt-Winter otherwise it will be just pure NN if --no_cb is supplied: no callbacks will be recorded, only a csv file containing predictions will be recorded at the end

Example: python script\Dowjones_Executer.py --model="Conv_LSTM" --hw

To only get the results of our experiments run:

python script\dowjones_results.py

Results

Below are some sample results of our generated predictions vs the ground truth.


This project was awarded 5.75/6.0 as part of the Deep Learning class taught by Prof. Dr. Thomas Hofmann at ETH Zürich.

time-series_imaging_forecasting's People

Contributors

simeonedef 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.