Giter Club home page Giter Club logo

rnn-rc-chaos's Introduction

RNN-RC-Chaos

This project contains minimal implementations of RNN architectures trained with Backpropagation through time (BPTT) and Reservoir Computing (RC) for high-dimensional time-series forecasting. The following models are implemented:

  • Long short-term memory (LSTM) trained with BPTT
  • Unitary RNNs trained with BPTT
  • Reservoir computers (RC) or Echo-state-networks (ESN)
  • Deep reservoir computers (Deep-RC) or (Deep-ESN) (private - ask for permission from [email protected])
  • Multilayered perceptron (feedforward MLP) based on a windowing approach.

Moreover, spatial parallelization of the aforementioned models are implemented according to [1]. For implementation of the method to compute the Lyapunov spectrum, please refer to the repository RNN-Lyapunov-Spectrum.

Code Requirements

The code requires python 3.7.3, tensorflow 1.11.0 Other required packages are: matplotlib, sklearn, psutil.

  • python 3.7.3
  • tensorflow 1.11.0
  • matplotlib, sklearn, psutil
  • mpi4py (parallel implementations)

The packages can be installed as follows: you can create a virtual environment in Python3 with:

python3 -m venv venv-RNN-RC-Chaos

Then activate the virtual environment:

source venv-RNN-RC-Chaos/bin/activate

Install a version of tensorflow (paper was compiled with version 1.11, which may no longer be available), here we also tested a more recent verion 1.14, (apart from warnings the code should run fine):

pip install tensorflow==1.14.0

Install the rest of the required packages with:

pip3 install matplotlib sklearn psutil mpi4py

The code is ready to run, you can test the following demo.

Datasets

The data to run a small demo are provided in the local ./Data folder

Demo

In order to run the demo in a local cluster, you can navigate to the Experiments folder, and select your desired application, e.g. Lorenz3D. There are scripts for each model. For example, you can ran a Reservoir Computer (also called Echo state network) with the following commands:

cd ./Experiments/Lorenz3D/Local
bash 01_ESN_auto.sh.sh

A statefull GRU or a parallel ESN can be run with:

bash 04_RNNStatefull_GRU.sh
bash 05_ESN_Parallel.sh

After running the command, you will see at the terminal output the training/testing progress. You can then navigate to the folder ./Results/Lorenz3D and check the different outputs of each model.

Note

This is only a minimal version of the code under development in the CSE-lab. Please contact [email protected] if you want to get informed, take a look at the latest version, with more features, models and capabilities.

Acknowledgments

This is joint work with:

Relevant Publications

[1] P.R. Vlachas, J. Pathak, B.R. Hunt et al., Backpropagation algorithms and Reservoir Computing in Recurrent Neural Networks for the forecasting of complex spatiotemporal dynamics. Neural Networks, 2020 (doi: https://doi.org/10.1016/j.neunet.2020.02.016.)

[2] J. Pathak, B.R. Hunt, M. Girvan, Z. Lu, and E. Ott, Model-Free Prediction of Large Spatiotemporally Chaotic Systems from Data: A Reservoir Computing Approach. Physical Review Letters 120 (2), 024102, 2018

[3] P.R. Vlachas, W. Byeon, Z.Y. Wan, T.P. Sapsis, and P. Koumoutsakos Data-driven forecasting of high-dimensional chaotic systems with long short-term memory networks. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 474 (2213), 2018

rnn-rc-chaos's People

Contributors

pvlachas avatar mattlevine22 avatar

Stargazers

 avatar

Watchers

James Cloos 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.