ReservoirComputing

Reservoir computing utilities for scientific machine learning (SciML)

https://github.com/sciml/reservoircomputing.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary

Keywords

differential-equations echo-state-networks julia machine-learning reservoir-computing rnn scientific-machine-learning sciml

Keywords from Contributors

matrix-exponential pdes julialang ode dynamical-systems numerical sde stochastic-processes bayesian-inference neural-sde
Last synced: 6 months ago · JSON representation ·

Repository

Reservoir computing utilities for scientific machine learning (SciML)

Basic Info
Statistics
  • Stars: 215
  • Watchers: 10
  • Forks: 41
  • Open Issues: 36
  • Releases: 35
Topics
differential-equations echo-state-networks julia machine-learning reservoir-computing rnn scientific-machine-learning sciml
Created about 6 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) [![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/ReservoirComputing/stable/) [![arXiv](https://img.shields.io/badge/arXiv-2204.05117-00b300.svg)](https://arxiv.org/abs/2204.05117) [![codecov](https://codecov.io/gh/SciML/ReservoirComputing.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/SciML/ReservoirComputing.jl) [![Build Status](https://github.com/SciML/ReservoirComputing.jl/workflows/CI/badge.svg)](https://github.com/SciML/ReservoirComputing.jl/actions?query=workflow%3ACI) [![Build status](https://badge.buildkite.com/db8f91b89a10ad79bbd1d9fdb1340e6f6602a1c0ed9496d4d0.svg)](https://buildkite.com/julialang/reservoircomputing-dot-jl) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) [![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) [![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) [![Julia](https://img.shields.io/badge/julia-v1.10+-blue.svg)](https://julialang.org/)

ReservoirComputing.jl

ReservoirComputing.jl provides an efficient, modular and easy to use implementation of Reservoir Computing models such as Echo State Networks (ESNs). For information on using this package please refer to the stable documentation. Use the in-development documentation to take a look at not yet released features.

Citing

If you use this library in your work, please cite:

bibtex @article{martinuzzi2022reservoircomputing, author = {Francesco Martinuzzi and Chris Rackauckas and Anas Abdelrehim and Miguel D. Mahecha and Karin Mora}, title = {ReservoirComputing.jl: An Efficient and Modular Library for Reservoir Computing Models}, journal = {Journal of Machine Learning Research}, year = {2022}, volume = {23}, number = {288}, pages = {1--8}, url = {http://jmlr.org/papers/v23/22-0611.html} }

Installation

ReservoirComputing.jl can be installed using either of

julia_repl julia> ] #actually press the closing square brackets pkg> add ReservoirComputing or

julia using Pkg Pkg.add("ReservoirComputing")

Quick Example

To illustrate the workflow of this library we will showcase how it is possible to train an ESN to learn the dynamics of the Lorenz system. As a first step we gather the data. For the Generative prediction we need the target data to be one step ahead of the training data:

```julia using ReservoirComputing, OrdinaryDiffEq, Random Random.seed!(42) rng = MersenneTwister(17)

lorenz system parameters

u0 = [1.0, 0.0, 0.0] tspan = (0.0, 200.0) p = [10.0, 28.0, 8 / 3]

define lorenz system

function lorenz(du, u, p, t) du[1] = p[1] * (u[2] - u[1]) du[2] = u[1] * (p[2] - u[3]) - u[2] du[3] = u[1] * u[2] - p[3] * u[3] end

solve and take data

prob = ODEProblem(lorenz, u0, tspan, p) data = Array(solve(prob, ABM54(); dt=0.02))

shift = 300 trainlen = 5000 predictlen = 1250

one step ahead for generative prediction

inputdata = data[:, shift:(shift + trainlen - 1)] targetdata = data[:, (shift + 1):(shift + trainlen)]

test = data[:, (shift + trainlen):(shift + trainlen + predict_len - 1)] ```

Now that we have the data we can initialize the ESN with the chosen parameters. Given that this is a quick example we are going to change the least amount of possible parameters:

julia input_size = 3 res_size = 300 esn = ESN(input_data, input_size, res_size; reservoir=rand_sparse(; radius=1.2, sparsity=6 / res_size), input_layer=weighted_init, nla_type=NLAT2(), rng=rng)

The echo state network can now be trained and tested. If not specified, the training will always be ordinary least squares regression:

julia output_layer = train(esn, target_data) output = esn(Generative(predict_len), output_layer)

The data is returned as a matrix, output in the code above, that contains the predicted trajectories. The results can now be easily plotted:

julia using Plots plot(transpose(output); layout=(3, 1), label="predicted") plot!(transpose(test); layout=(3, 1), label="actual")

lorenz_basic

One can also visualize the phase space of the attractor and the comparison with the actual one:

julia plot(transpose(output)[:, 1], transpose(output)[:, 2], transpose(output)[:, 3]; label="predicted") plot!(transpose(test)[:, 1], transpose(test)[:, 2], transpose(test)[:, 3]; label="actual")

lorenz_attractor

Acknowledgements

This project was possible thanks to initial funding through the Google summer of code 2020 program. Francesco M. further acknowledges ScaDS.AI and RSC4Earth for supporting the current progress on the library.

Owner

  • Name: SciML Open Source Scientific Machine Learning
  • Login: SciML
  • Kind: organization
  • Email: contact@chrisrackauckas.com

Open source software for scientific machine learning

Citation (CITATION.bib)

@article{JMLR:v23:22-0611,
  author  = {Francesco Martinuzzi and Chris Rackauckas and Anas Abdelrehim and Miguel D. Mahecha and Karin Mora},
  title   = {ReservoirComputing.jl: An Efficient and Modular Library for Reservoir Computing Models},
  journal = {Journal of Machine Learning Research},
  year    = {2022},
  volume  = {23},
  number  = {288},
  pages   = {1--8},
  url     = {http://jmlr.org/papers/v23/22-0611.html}
}

GitHub Events

Total
  • Create event: 63
  • Commit comment event: 29
  • Issues event: 32
  • Release event: 12
  • Watch event: 12
  • Delete event: 45
  • Issue comment event: 94
  • Push event: 213
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 91
  • Fork event: 3
Last Year
  • Create event: 63
  • Commit comment event: 29
  • Issues event: 32
  • Release event: 12
  • Watch event: 12
  • Delete event: 45
  • Issue comment event: 94
  • Push event: 213
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 91
  • Fork event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 558
  • Total Committers: 21
  • Avg Commits per committer: 26.571
  • Development Distribution Score (DDS): 0.265
Past Year
  • Commits: 136
  • Committers: 4
  • Avg Commits per committer: 34.0
  • Development Distribution Score (DDS): 0.022
Top Committers
Name Email Commits
MartinuzziFrancesco m****o@g****m 410
Christopher Rackauckas a****s@c****m 28
Anas a****m@g****m 25
github-actions[bot] 4****] 20
CompatHelper Julia c****y@j****g 19
Arno Strouwen a****n@t****e 13
Jay-sanjay 1****y 9
Anant Thazhemadam a****m@g****m 8
dependabot[bot] 4****] 7
jamesjscully j****y@g****m 4
Kanav Gupta 3****9 3
Chris de Graaf me@c****v 2
Krishna Bhogaonker c****q@g****m 2
AnasAbdelR 7****R 1
Christos m****i@g****m 1
David Widmann d****n 1
Emanuele Natale n****a 1
Páll Haraldsson P****n@g****m 1
Viral B. Shah V****h 1
maja.k.gwozdz@gmail.com m****z@g****m 1
Hendrik Ranocha m****l@r****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 60
  • Total pull requests: 234
  • Average time to close issues: 5 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 16
  • Total pull request authors: 17
  • Average comments per issue: 4.38
  • Average comments per pull request: 0.49
  • Merged pull requests: 175
  • Bot issues: 0
  • Bot pull requests: 77
Past Year
  • Issues: 20
  • Pull requests: 103
  • Average time to close issues: 6 days
  • Average time to close pull requests: 1 day
  • Issue authors: 2
  • Pull request authors: 5
  • Average comments per issue: 0.7
  • Average comments per pull request: 0.24
  • Merged pull requests: 79
  • Bot issues: 0
  • Bot pull requests: 12
Top Authors
Issue Authors
  • MartinuzziFrancesco (39)
  • sdwfrost (4)
  • AnasAbdelR (2)
  • gbaraldi (2)
  • ngiann (2)
  • timothyslau (1)
  • AnHeuermann (1)
  • rylanperumal (1)
  • Datseris (1)
  • njk7062 (1)
  • spin0r (1)
  • abrari-itk (1)
  • AraujoH (1)
  • jClugstor (1)
  • ArnoStrouwen (1)
Pull Request Authors
  • MartinuzziFrancesco (112)
  • github-actions[bot] (64)
  • ArnoStrouwen (13)
  • dependabot[bot] (13)
  • ChrisRackauckas (8)
  • thazhemadam (7)
  • Jay-sanjay (4)
  • AnasAbdelR (3)
  • 00krishna (2)
  • jamesjscully (1)
  • natema (1)
  • ranocha (1)
  • christopher-dG (1)
  • PallHaraldsson (1)
  • Chronum94 (1)
Top Labels
Issue Labels
good first issue (15) inits (10) enhancement (9) bug (8) documentation (4) new model (4) states (3) Model Variation (2) v0.10 (2) question (2) breaking (1)
Pull Request Labels
dependencies (13) github_actions (4)

Packages

  • Total packages: 3
  • Total downloads:
    • julia 19 total
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 110
proxy.golang.org: github.com/SciML/ReservoirComputing.jl
  • Versions: 35
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: github.com/sciml/reservoircomputing.jl
  • Versions: 35
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
juliahub.com: ReservoirComputing

Reservoir computing utilities for scientific machine learning (SciML)

  • Versions: 40
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 19 Total
Rankings
Stargazers count: 4.4%
Forks count: 4.9%
Dependent repos count: 9.9%
Average: 14.5%
Dependent packages count: 38.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/Downgrade.yml actions
  • actions/checkout v4 composite
  • cjdoris/julia-downgrade-compat-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite