{"id":15063992,"url":"https://github.com/plasmacontrol/pyrcn","last_synced_at":"2025-09-22T09:30:41.195Z","repository":{"id":44686065,"uuid":"279611799","full_name":"PlasmaControl/PyRCN","owner":"PlasmaControl","description":"A Python 3 framework for Reservoir Computing with a scikit-learn-compatible API.","archived":false,"fork":false,"pushed_at":"2024-07-17T14:07:57.000Z","size":201842,"stargazers_count":90,"open_issues_count":5,"forks_count":19,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-01-14T03:07:10.852Z","etag":null,"topics":["echo-state-network","extreme-learning-machine","machine-learning","reservoir-computing","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlasmaControl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-14T14:42:41.000Z","updated_at":"2024-12-30T08:01:44.000Z","dependencies_parsed_at":"2024-09-25T00:10:07.044Z","dependency_job_id":"cc37723e-934b-407f-ae7c-cae6db8af640","html_url":"https://github.com/PlasmaControl/PyRCN","commit_stats":null,"previous_names":["tud-stks/pyrcn"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FPyRCN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FPyRCN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FPyRCN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FPyRCN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlasmaControl","download_url":"https://codeload.github.com/PlasmaControl/PyRCN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233837049,"owners_count":18737907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["echo-state-network","extreme-learning-machine","machine-learning","reservoir-computing","scikit-learn"],"created_at":"2024-09-25T00:09:54.282Z","updated_at":"2025-09-22T09:30:35.180Z","avatar_url":"https://github.com/PlasmaControl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyRCN\n**A Python 3 framework for Reservoir Computing with a [scikit-learn](https://scikit-learn.org/stable/)-compatible API.**\n\n[![PyPI version](https://badge.fury.io/py/PyRCN.svg)](https://badge.fury.io/py/PyRCN)\n[![Documentation Status](https://readthedocs.org/projects/pyrcn/badge/?version=latest)](https://pyrcn.readthedocs.io/en/latest/?badge=latest)\n\nPyRCN (\"Python Reservoir Computing Networks\") is a light-weight and transparent Python 3 framework for Reservoir Computing and is based on widely used scientific Python packages, such as numpy or scipy. \nThe API is fully scikit-learn-compatible, so that users of scikit-learn do not need to refactor their code in order to use the estimators implemented by this framework. \nScikit-learn's built-in parameter optimization methods and example datasets can also be used in the usual way.\n\nPyRCN is used by the [Chair of Speech Technology and Cognitive Systems, Institute for Acoustics and Speech Communications, Technische Universität Dresden, Dresden, Germany](https://tu-dresden.de/ing/elektrotechnik/ias/stks?set_language=en) \nand [IDLab (Internet and Data Lab), Ghent University, Ghent, Belgium](https://www.ugent.be/ea/idlab/en). \n\nCurrently, it implements Echo State Networks (ESNs) by Herbert Jaeger and Extreme Learning Machines (ELMs) by Guang-Bin Huang in different flavors, e.g. Classifier and Regressor. It is actively developed to be extended into several directions:\n\n- Interaction with [sktime](http://sktime.org/)\n- Interaction with [hmmlearn](https://hmmlearn.readthedocs.io/en/stable/)\n- More towards future work: Related architectures, such as Liquid State Machines (LSMs) and Perturbative Neural Networks (PNNs)\n\nPyRCN has successfully been used for several tasks:\n\n- Music Information Retrieval (MIR)\n    - Multipitch tracking\n    - Onset detection\n    - $f_{0}$ analysis of spoken language\n    - GCI detection in raw audio signals\n- Time Series Prediction\n    - Mackey-Glass benchmark test\n    - Stock price prediction\n- Ongoing research tasks:\n    - Beat tracking in music signals\n    - Pattern recognition in sensor data\n    - Phoneme recognition\n    - Unsupervised pre-training of RCNs and optimization of ESNs\n\nPlease see the [References section](#references) for more information. For code examples, see [Getting started](#getting-started).\n\n## Installation\n\n### Prerequisites\n\nPyRCN is developed using Python 3.9 or newer. It depends on the following packages:\n\n- [numpy\u003e=1.18.1](https://numpy.org/)\n- [scikit-learn\u003e=1.4](https://scikit-learn.org/stable/)\n- [joblib\u003e=0.13.2](https://joblib.readthedocs.io)\n- [pandas\u003e=1.0.0](https://pandas.pydata.org/)\n- [matplotlib](https://matplotlib.org/)\n- [seaborn](https://seaborn.pydata.org/)\n\n### Installation from PyPI\n\nThe easiest and recommended way to install ``PyRCN`` is to use ``pip`` from [PyPI](https://pypi.org) :\n\n```\npip install pyrcn\n```\n\n### Installation from source\n\nIf you plan to contribute to ``PyRCN``, you can also install the package from source.\n\nClone the Git repository:\n\n```\ngit clone https://github.com/TUD-STKS/PyRCN.git\n```\n\nInstall the package using ``setup.py``:\n```\npython setup.py install --user\n```\n\n## Offcial documentation\n\nSee [the official PyRCN documentation](https://pyrcn.readthedocs.io/en/latest/?badge=latest)\nto learn more about the main features of PyRCN, its API and the installation process.\n\n## Package structure\nThe package is structured in the following way: \n\n- `doc`\n    - This folder includes the package documentation.\n- `examples`\n    - This folder includes example code as Jupyter Notebooks and python scripts.\n- `images`\n    - This folder includes the logos used in ´README.md´.\n- `pyrcn`\n    - This folder includes the actual Python package.\n\n\n## Getting Started\n\nPyRCN includes currently variants of Echo State Networks (ESNs) and Extreme Learning Machines (ELMs): Regressors and Classifiers.\n\nBasic example for the ESNClassifier:\n\n```python\nfrom sklearn.model_selection import train_test_split\nfrom pyrcn.datasets import load_digits\nfrom pyrcn.echo_state_network import ESNClassifier\n\nX, y = load_digits(return_X_y=True, as_sequence=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nclf = ESNClassifier()\nclf.fit(X=X_train, y=y_train)\n\ny_pred_classes = clf.predict(X=X_test)  # output is the class for each input example\ny_pred_proba = clf.predict_proba(X=X_test)  #  output are the class probabilities for each input example\n```\n\nBasic example for the ESNRegressor:\n\n```python\nfrom pyrcn.datasets import mackey_glass\nfrom pyrcn.echo_state_network import ESNRegressor\n\nX, y = mackey_glass(n_timesteps=20000)\n\nreg = ESNRegressor()\nreg.fit(X=X[:8000], y=y[:8000])\n\ny_pred = reg.predict(X[8000:])  # output is the prediction for each input example\n```\n\nAn extensive introduction to getting started with PyRCN is included in the [examples](https://github.com/TUD-STKS/PyRCN/blob/main/examples) directory. \nThe notebook [digits](https://github.com/TUD-STKS/PyRCN/blob/main/examples/digits.ipynb) or its corresponding [Python script](https://github.com/TUD-STKS/PyRCN/blob/main/examples/digits.py) show how to set up an ESN for a small hand-written digit recognition experiment. \nLaunch the digits notebook on Binder: \n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TUD-STKS/PyRCN/main?filepath=examples%2Fdigits.ipynb)\n\nThe notebook [PyRCN_Intro](https://github.com/TUD-STKS/PyRCN/blob/main/examples/PyRCN_Intro.ipynb) or its corresponding [Python script](https://github.com/TUD-STKS/PyRCN/blob/main/examples/PyRCN_Intro.py) show how to construct different RCNs with building blocks. \n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TUD-STKS/PyRCN/main?filepath=examples%2FPyRCN_Intro.ipynb)\n\nThe notebook [Impulse responses](https://github.com/TUD-STKS/PyRCN/blob/main/examples/esn_impulse_responses.ipynb) is an interactive tool to demonstrate the impact of different hyper-parameters on the impulse responses of an ESN. \n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TUD-STKS/PyRCN/main?filepath=examples%2Fesn_impulse_responses.ipynb)\n\nFore more advanced examples, please have a look at our [Automatic Music Transcription Repository](https://github.com/TUD-STKS/Automatic-Music-Transcription), in which we provide an entire feature extraction, training and test pipeline for multipitch tracking and for note onset detection using PyRCN. This is currently transferred to this repository.\n\n## Citation\n\nIf you use PyRCN, please cite the following publication:\n\n```latex\n@misc{steiner2021pyrcn,\n      title={PyRCN: A Toolbox for Exploration and Application of Reservoir Computing Networks}, \n      author={Peter Steiner and Azarakhsh Jalalvand and Simon Stone and Peter Birkholz},\n      year={2021},\n      eprint={2103.04807},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\n\n## References\n\n[Unsupervised Pretraining of Echo State Networks for Onset Detection](https://link.springer.com/chapter/10.1007/978-3-030-85099-9_12)\n\n```\n@InProceedings{src:Steiner-21e,\n   author=\"Peter Steiner and Azarakhsh Jalalvand and Peter Birkholz\",\n   editor=\"Igor Farka{\\v{s}} and Paolo Masulli and Sebastian Otte and Stefan Wermter\",\n   title=\"{U}nsupervised {P}retraining of {E}cho {S}tate {N}etworks for {O}nset {D}etection\",\n   booktitle=\"Artificial Neural Networks and Machine Learning -- ICANN 2021\",\n   year=\"2021\",\n   publisher=\"Springer International Publishing\",\n   address=\"Cham\",\n   pages=\"59--70\",\n   isbn=\"978-3-030-86383-8\"\n}\n\n\n```\n\n[Improved Acoustic Modeling for Automatic Piano Music Transcription Using Echo State Networks](https://link.springer.com/chapter/10.1007/978-3-030-85099-9_12)\n\n```\n@InProceedings{src:Steiner-21d,\n\tauthor=\"Peter Steiner and Azarakhsh Jalalvand and Peter Birkholz\",\n\teditor=\"Ignacio Rojas and Gonzalo Joya and Andreu Catala\",\n\ttitle=\"{I}mproved {A}coustic {M}odeling for {A}utomatic {P}iano {M}usic {T}ranscription {U}sing {E}cho {S}tate {N}etworks\",\n\tbooktitle=\"Advances in Computational Intelligence\",\n\tyear=\"2021\",\n\tpublisher=\"Springer International Publishing\",\n\taddress=\"Cham\",\n\tpages=\"143--154\",\n\tisbn=\"978-3-030-85099-9\"\n}\n```\n\nGlottal Closure Instant Detection using Echo State Networks\n- [Paper](http://www.essv.de/pdf/2021_161_168.pdf)\n- [Repository](https://github.com/TUD-STKS/gci_estimation)\n- Reference\n```latex\n@InProceedings{src:Steiner-21c,\n\ttitle = {Glottal Closure Instant Detection using Echo State Networks},\n\tauthor = {Peter Steiner and Ian S. Howard and Peter Birkholz},\n\tyear = {2021},\n\tpages = {161--168},\n\tkeywords = {Oral},\n\tbooktitle = {Studientexte zur Sprachkommunikation: Elektronische Sprachsignalverarbeitung 2021},\n\teditor = {Stefan Hillmann and Benjamin Weiss and Thilo Michael and Sebastian Möller},\n\tpublisher = {TUDpress, Dresden},\n\tisbn = {978-3-95908-227-3}\n}\n```\n\nCluster-based Input Weight Initialization for Echo State Networks\n\n```latex\n@article{Steiner2022cluster,\n\tauthor = {Steiner, Peter and Jalalvand, Azarakhsh and Birkholz, Peter},\n\tdoi = {10.1109/TNNLS.2022.3145565},\n\tissn = {2162-2388},\n\tjournal = {IEEE Transactions on Neural Networks and Learning Systems},\n\tkeywords = {},\n\tmonth = {},\n\tnumber = {},\n\tpages = {1--12},\n\ttitle = {Cluster-based Input Weight Initialization for Echo State Networks},\n\tvolume = {},\n\tyear = {2022},\n}\n```\n\nPyRCN: A Toolbox for Exploration and Application of Reservoir Computing Networks\n\n```latex\n@article{Steiner2022pyrcn,\n\ttitle = {PyRCN: A Toolbox for Exploration and Application of Reservoir Computing Networks},\n\tjournal = {Engineering Applications of Artificial Intelligence},\n\tvolume = {113},\n\tpages = {104964},\n\tyear = {2022},\n\tissn = {0952-1976},\n\tdoi = {10.1016/j.engappai.2022.104964},\n\turl = {https://www.sciencedirect.com/science/article/pii/S0952197622001713},\n\tauthor = {Peter Steiner and Azarakhsh Jalalvand and Simon Stone and Peter Birkholz},\n}\n```\n\n[Feature Engineering and Stacked ESNs for Musical Onset Detection](https://ieeexplore.ieee.org/abstract/document/9413205)\n\n```latex\n@INPROCEEDINGS{src:Steiner-21b,\n    author={Peter Steiner and Azarakhsh Jalalvand and Simon Stone and Peter Birkholz},\n    booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},\n    title={{F}eature {E}ngineering and {S}tacked {E}cho {S}tate {N}etworks for {M}usical {O}nset {D}etection},\n    year={2021},\n    volume={},\n    number={},\n    pages={9537--9544},\n    doi={10.1109/ICPR48806.2021.9413205}\n}\n```\n\n[Multipitch tracking in music signals using Echo State Networks](https://ieeexplore.ieee.org/abstract/document/9287638)\n\n```latex\n@INPROCEEDINGS{src:Steiner-21a,\n    author={Peter Steiner and Simon Stone and Peter Birkholz and Azarakhsh Jalalvand},\n    booktitle={2020 28th European Signal Processing Conference (EUSIPCO)},\n    title={{M}ultipitch tracking in music signals using {E}cho {S}tate {N}etworks},\n    year={2021},\n    volume={},\n    number={},\n    pages={126--130},\n    keywords={},\n    doi={10.23919/Eusipco47968.2020.9287638},\n    ISSN={2076-1465},\n    month={Jan},\n```\n\n[Note Onset Detection using Echo State Networks](http://www.essv.de/pdf/2020_157_164.pdf)\n\n```latex\n@InProceedings{src:Steiner-20,\n\ttitle = {Note Onset Detection using Echo State Networks},\n\tauthor = {Peter Steiner and Simon Stone and Peter Birkholz},\n\tyear = {2020},\n\tpages = {157--164},\n\tkeywords = {Poster},\n\tbooktitle = {Studientexte zur Sprachkommunikation: Elektronische Sprachsignalverarbeitung 2020},\n\teditor = {Ronald Böck and Ingo Siegert and Andreas Wendemuth},\n\tpublisher = {TUDpress, Dresden},\n\tisbn = {978-3-959081-93-1}\n} \n```\n\n[Multiple-F0 Estimation using Echo State Networks](https://www.music-ir.org/mirex/abstracts/2019/SBJ1.pdf)\n\n```latex\n@inproceedings{src:Steiner-19,\n  title={{M}ultiple-{F}0 {E}stimation using {E}cho {S}tate {N}etworks},\n  booktitle={{MIREX}},\n  author={Peter Steiner and Azarakhsh Jalalvand and Peter Birkholz},\n  year={2019},\n  url = {https://www.music-ir.org/mirex/abstracts/2019/SBJ1.pdf}\n}\n```\n\n\n## Acknowledgments\nThis research was funded by the European Social Fund (Application number: 100327771) and co-financed by tax funds based on the budget approved by the members of the Saxon State Parliament, and by Ghent University.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Fpyrcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasmacontrol%2Fpyrcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Fpyrcn/lists"}