Skip to main content

A simple and flexible code for Reservoir Computing architectures like Echo State Networks.

Project description

ReservoirPy banner

PyPI version Documentation Status Build Status

ReservoirPy (v0.3.0-beta) 🌀 🧠

Simple and flexible code for Reservoir Computing architectures like Echo State Networks (ESN).

from reservoirpy.nodes import Reservoir, Ridge, Input

data      = Input(input_dim=1)
reservoir = Reservoir(100, lr=0.1, sr=0.99)
readout   = Ridge(1, ridge=1e-3)

esn = data >> reservoir >> readout

forecast = esn.fit(X, y).run(timeseries)

ReservoirPy is a simple user-friendly library based on Python scientific modules. It provides a flexible interface to implement efficient Reservoir Computing (RC) architectures with a particular focus on Echo State Networks (ESN). Advanced features of ReservoirPy allow to improve computation time efficiency on a simple laptop compared to basic Python implementation. Some of its features are: offline and online training, parallel implementation, sparse matrix computation, fast spectral initialization, etc. Moreover, graphical tools are included to easily explore hyperparameters with the help of the hyperopt library.

This library works for Python 3.8 and higher.

Offcial documentation 📖

See the official ReservoirPy's documentation to learn more about the main features of ReservoirPy, its API and the installation process.

Examples and tutorials 🎓

Go to the tutorial folder for tutorials in Jupyter Notebooks.

Go to the examples folder for examples and papers with codes, also in Jupyter Notebooks.

Quick try ⚡

Chaotic timeseries prediction (MackeyGlass)

Run and analyse these two files to see how to make timeseries prediction with Echo State Networks:

  • simple_example_MackeyGlass.py (using the ESN class)

    python simple_example_MackeyGlass.py
    
  • minimalESN_MackeyGlass.py (without the ESN class)

    python minimalESN_MackeyGlass.py
    

Preprint with tutorials

Tutorial on ReservoirPy can be found in this preprint (Trouvain et al. 2020).

Explore Hyper-Parameters with Hyperopt

A quick tutorial on how to explore hyperparameters with ReservoirPy and Hyperopt can be found in this preprint (Trouvain et al. 2020).

Take a look at our advices and general method to explore hyperparameters for reservoirs in our recent paper: "Which Hype for My New Task? Hints and Random Search for Echo State Networks Hyperparameters", ICANN 2021 HTML Preprint

Turorial and Jupyter Notebook for hyper-parameter exploration

More info on hyperopt: Official website

Cite

Nathan Trouvain, Luca Pedrelli, Thanh Trung Dinh, Xavier Hinaut. ReservoirPy: an Efficient and User-Friendly Library to Design Echo State Networks. 2020. ⟨hal-02595026⟩ https://hal.inria.fr/hal-02595026

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reservoirpy-0.3.0b0.tar.gz (62.4 MB view details)

Uploaded Source

File details

Details for the file reservoirpy-0.3.0b0.tar.gz.

File metadata

  • Download URL: reservoirpy-0.3.0b0.tar.gz
  • Upload date:
  • Size: 62.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.10

File hashes

Hashes for reservoirpy-0.3.0b0.tar.gz
Algorithm Hash digest
SHA256 51a4210dfd39dde56f25b54490c0bbd58fac4f58838c8f3349122e14cccf3d83
MD5 45eb3acd910c2f91699bbafa73d87628
BLAKE2b-256 806bd5559ad412106b19a2c44712cf9fb94f5a762b495248cf7056dd3905544b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page