Skip to main content

A Python3 framework for Reservoir Computing with a scikit-learn-compatible API

Project description

PyRCN

A Python 3 framework for Reservoir Computing with a scikit-learn-compatible API.

PyRCN is a light-weight and transparent Python 3 framework that implements ESNs and is based on widely used scientific Python packages, such as numpy or scipy. The API is fully scikit-learn-compatible, so that users of scikit-learn do not need to restructure their research data in order to use ESNs. Interested used can directly use scikit-learns built-in parameter optimization methods and example datasets.

PyRCN 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) and IDLab (Internet and Data Lab), Ghent University, Ghent, Belgium (https://www.ugent.be/ea/idlab/en).

It is an acronym for "Python Reservoir Computing Networks".

Currently, it implements Echo State Networks (ESNs) by Herbert Jaeger in different flavors, e.g. Classifier and Regressor. It is actively developed to be extended into several directions:

  • Incorporate Feedback
  • Better sequence handling with sktime (http://sktime.org/)
  • A unified API to stack ESNs
  • More towards future work: Related architectures, such as Extreme Learning Machines (ELMs) and Liquid State Machines (LSMs)

PyRCN has successfully been used for several tasks:

  • Music Information Retrieval (MIR)
    • Multipitch Tracking
    • Onset Detection
  • Time Series Prediction
    • Mackey-Glass benchmark test
    • Stock Price Prediction
  • Tasks we are working on at the moment:
    • Beat Tracking in music signals
    • Pattern recognition in sensor data
    • Phoneme recognition

Please see the "Reference" section for more information. Code examples to getting started with PyRCN are included in the "examples" directory.

Installation

Prerequisites

PyRCn is developed using Python 3.6 or newer. It depends on the following packages:

Installation from PyPI

The easiest and recommended way to install PyRCN is to use pip from (PyPI)[https://pypi.org] :

pip install pyrcn   

Installation from source

If you plan to contribute to PyRCN, you can also install the package from source.

Clone the Git repository:

git clone https://github.com/TUD-STKS/PyRCN.git

Install the package using setup.py:

python setup.py install --user

Package structure

The package is structured in the following way:

  • doc
    • This folder includes the package documentation.
  • examples
    • This folder includes example code as Jupyter Notebooks and python scripts.
  • images
    • This folder includes the logos used in ´README.md´.
  • pyrcn
    • This folder includes the actual Python package.

Getting Started

PyRCN includes currently two variants of Echo State Networks (ESNs): The ESNClassifier is meant to be a classifier, the ESNRegressor is meant to be a regressor.

Basic example for the ESNClassifier:

from pyrcn.echo_state_network import ESNClassifier


clf = ESNClassifier()
clf.fit(X=X_train, y=y_train)

y_pred_classes = clf.predict(X=X_test)  # output is the class for each input example
y_pred_proba = clf.predict_proba(X=X_test)  #  output are the class probabilities for each input example

Basic example for the ESNRegressor:

from pyrcn.echo_state_network import ESNRegressor


reg = ESNRegressor()
ref.fit(X=X_train, y=y_train)

y_pred = reg.predict(X=X_test)  # output is the prediction for each input example

Citation

If you use PyRCN, please cite the following publication:

@INPROCEEDINGS{src:Steiner-20c,  
    author={Peter Steiner and Azarakhsh Jalalvand and Simon Stone Peter Birkholz},  
    booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},   
    title={PyRCN: Exploration and Application of ESNs},  
    year={2020},  
    note={submitted},
}

References:

PyRCN: Exploration and Application of ESNs

@INPROCEEDINGS{src:Steiner-20c,  
    author={Peter Steiner and Azarakhsh Jalalvand and Simon Stone Peter Birkholz},  
    booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},   
    title={PyRCN: Exploration and Application of ESNs},  
    year={2020},  
    note={submitted},
}

Note Onset Detection using Echo State Networks

@InProceedings{src:Steiner-20a,
	title = {Note Onset Detection using Echo State Networks},
	author = {Peter Steiner and Simon Stone and Peter Birkholz},
	year = {2020},
	pages = {157--164},
	keywords = {Poster},
	booktitle = {Studientexte zur Sprachkommunikation: Elektronische Sprachsignalverarbeitung 2020},
	editor = {Ronald Böck and Ingo Siegert and Andreas Wendemuth},
	publisher = {TUDpress, Dresden},
	isbn = {978-3-959081-93-1}
} 

Feature Engineering and Stacked ESNs for Musical Onset Detection

@INPROCEEDINGS{src:Steiner-20d,  
    author={Peter Steiner and Simon Stone and Azarakhsh Jalalvand and Peter Birkholz},  
    booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},   
    title={Feature Engineering and Stacked ESNs for Musical Onset Detection},  
    year={2020},  
    volume={},  
    number={},  
    note={submitted},
}

Multipitch tracking in music signals using Echo State Networks

@INPROCEEDINGS{src:Steiner-20b,
    author={Peter Steiner and Simon Stone and Peter Birkholz and Azarakhsh Jalalvand},
    booktitle={28th European Signal Processing Conference (EUSIPCO), 2020},
    title={Multipitch tracking in music signals using Echo State Networks},
    year={2020},
    note={accepted},
}

Multiple-F0 {E}stimation using {E}cho {S}tate {N}etworks

@inproceedings{src:Steiner-19,
  title={Multiple-F0 {E}stimation using {E}cho {S}tate {N}etworks},
  booktitle={{MIREX}},
  author={Peter Steiner and Azarakhsh Jalalvand and Peter Birkholz},
  year={2019},
  url = {https://www.music-ir.org/mirex/abstracts/2019/SBJ1.pdf}
}

Acknowledgements

This research was financed by Europäischer Sozialfonds (ESF), the Free State of Saxony (Application number: 100327771) and Ghent University.

Project details


Download files

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

Source Distribution

PyRCN-0.0.3b0.tar.gz (62.9 MB view details)

Uploaded Source

Built Distribution

PyRCN-0.0.3b0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file PyRCN-0.0.3b0.tar.gz.

File metadata

  • Download URL: PyRCN-0.0.3b0.tar.gz
  • Upload date:
  • Size: 62.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.5

File hashes

Hashes for PyRCN-0.0.3b0.tar.gz
Algorithm Hash digest
SHA256 638b77d9b60b1f93f1ac86d2643cdae480d7631de26c9dfd5779fed04f61c6b0
MD5 3d7d504bdbda7f7a6f0293698396ee6b
BLAKE2b-256 2713ba3a033f4955bc3013239dc6509402988ecefc40a3e9c285fcebd418a6fc

See more details on using hashes here.

File details

Details for the file PyRCN-0.0.3b0-py3-none-any.whl.

File metadata

  • Download URL: PyRCN-0.0.3b0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.5

File hashes

Hashes for PyRCN-0.0.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 2852b3b15ce2550f2e77634717df7162e9b88c1fbdcd9ebfbe5d49d9d0c712e6
MD5 f1af1bb739ee85bede8f984aa4d2d7dd
BLAKE2b-256 c66552a1760398864f493a41819cc97e27d9a693e436f9bfb376f1f753be37f0

See more details on using hashes here.

Supported by

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