Skip to main content

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

PyPI version HAL PyPI - Python Version
Downloads Documentation Status Testing codecov

Google Colab iconTutorials: Open in Colab

Open book iconDocumentation: https://reservoirpy.readthedocs.io/


Feature overview:

Moreover, graphical tools are included to easily explore hyperparameters with the help of the hyperopt library.

Quick try ⚡

Installation

pip install reservoirpy

For more complete installation (including hyperparameter search, ...), look at the complete installation guide on ReadTheDocs.

An example on chaotic timeseries prediction (Mackey-Glass)

For a general introduction to reservoir computing and ReservoirPy features, take a look at the tutorials

from reservoirpy import ESN

from reservoirpy.datasets import mackey_glass, to_forecasting
from reservoirpy.observables import rmse, rsquare

### Step 1: Load the dataset

X = mackey_glass(n_timesteps=2000)  # (2000, 1)-shaped array
# create y by shifting X, and train/test split
x_train, x_test, y_train, y_test = to_forecasting(X, test_size=0.2)

### Step 2: Create an Echo State Network

# 100 neurons, sr = spectral radius, lr = leak rate
esn = ESN(units=100, sr=1.25, lr=0.3, ridge=1e-5)

### Step 3: Fit, run and evaluate the ESN

esn.fit(x_train, y_train, warmup=100)
predictions = esn.run(x_test)

print(f"RMSE: {rmse(y_test, predictions)}; R^2 score: {rsquare(y_test, predictions)}")
# RMSE: 0.0020282; R^2 score: 0.99992

More examples and tutorials 🎓

Tutorials

Examples

For advanced users, we also showcase partial reproduction of papers on reservoir computing to demonstrate some features of the library.

Papers and projects using ReservoirPy

If you want your paper to appear here, please contact us (see contact link below).

  • ( HAL | PDF | Code ) Leger et al. (2024) Evolving Reservoirs for Meta Reinforcement Learning. EvoAPPS 2024
  • ( arXiv | PDF ) Chaix-Eichel et al. (2022) From implicit learning to explicit representations. arXiv preprint arXiv:2204.02484.
  • ( HTML | HAL | PDF ) Trouvain & Hinaut (2021) Canary Song Decoder: Transduction and Implicit Segmentation with ESNs and LTSMs. ICANN 2021
  • ( HTML ) Pagliarini et al. (2021) Canary Vocal Sensorimotor Model with RNN Decoder and Low-dimensional GAN Generator. ICDL 2021.
  • ( HAL | PDF ) Pagliarini et al. (2021) What does the Canary Say? Low-Dimensional GAN Applied to Birdsong. HAL preprint.
  • ( HTML | HAL | PDF ) Hinaut & Trouvain (2021) Which Hype for My New Task? Hints and Random Search for Echo State Networks Hyperparameters. ICANN 2021

Awesome Reservoir Computing

We also provide a curated list of tutorials, papers, projects and tools for Reservoir Computing (not necessarily related to ReservoirPy) here!:

https://github.com/reservoirpy/awesome-reservoir-computing

Contact

If you have a question regarding the library, please open an issue.

If you have more general question or feedback you can contact us by email to xavier dot hinaut the-famous-home-symbol inria dot fr.

Citing ReservoirPy

Trouvain, N., Pedrelli, L., Dinh, T. T., Hinaut, X. (2020) ReservoirPy: an efficient and user-friendly library to design echo state networks. In International Conference on Artificial Neural Networks (pp. 494-505). Springer, Cham. ( HTML | HAL | PDF )

If you're using ReservoirPy in your work, please cite our package using the following bibtex entry:

@incollection{Trouvain2020,
  doi = {10.1007/978-3-030-61616-8_40},
  url = {https://doi.org/10.1007/978-3-030-61616-8_40},
  year = {2020},
  publisher = {Springer International Publishing},
  pages = {494--505},
  author = {Nathan Trouvain and Luca Pedrelli and Thanh Trung Dinh and Xavier Hinaut},
  title = {{ReservoirPy}: An Efficient and User-Friendly Library to Design Echo State Networks},
  booktitle = {Artificial Neural Networks and Machine Learning {\textendash} {ICANN} 2020}
}

Acknowledgement


This package is developed and supported by Inria at Bordeaux, France in Mnemosyne group. Inria is a French Research Institute in Digital Sciences (Computer Science, Mathematics, Robotics, ...).

Metadata

Release files for reservoirpy 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reservoirpy 0.4.3
File Size Uploaded Provenance Actions
reservoirpy-0.4.3.tar.gz 180.8 kB Without provenance Details for reservoirpy-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reservoirpy 0.4.3
File Interpreter ABI Platform Actions
reservoirpy-0.4.3-py3-none-any.whl Python 3 none any Details for reservoirpy-0.4.3-py3-none-any.whl

Total release size: 418.9 kB

Release files / reservoirpy-0.4.3.tar.gz

Download URL reservoirpy-0.4.3.tar.gz
Size 180.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b1ddba46c05fc3a2d4415dbfcb8535bffeb7da0a75940d46aeab237f84255eb
BLAKE2b-256 checksum
How to use checksums
4c6cb6add4c20a75bcc130af65a3f389ef7edc930699372435679f6ef183bc96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / reservoirpy-0.4.3-py3-none-any.whl

Download URL reservoirpy-0.4.3-py3-none-any.whl
Size 238.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7b41b722002a0ec4ee20576ea5d3b3f4489101f5ab94eceaa265408b8979ba3
BLAKE2b-256 checksum
How to use checksums
eab4af12da9b7139998c4fa09f3e082e8ecc3f274a59bdb134c96e3cf95e486c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for reservoirpy 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page