echostatenetwork 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- echostatenetwork-0.1.1/LICENSE +21 -0
- echostatenetwork-0.1.1/MANIFEST.in +1 -0
- echostatenetwork-0.1.1/PKG-INFO +69 -0
- echostatenetwork-0.1.1/README.md +42 -0
- echostatenetwork-0.1.1/echostatenetwork/__init__.py +13 -0
- echostatenetwork-0.1.1/echostatenetwork/esn.py +1945 -0
- echostatenetwork-0.1.1/echostatenetwork.egg-info/PKG-INFO +69 -0
- echostatenetwork-0.1.1/echostatenetwork.egg-info/SOURCES.txt +12 -0
- echostatenetwork-0.1.1/echostatenetwork.egg-info/dependency_links.txt +1 -0
- echostatenetwork-0.1.1/echostatenetwork.egg-info/requires.txt +11 -0
- echostatenetwork-0.1.1/echostatenetwork.egg-info/top_level.txt +1 -0
- echostatenetwork-0.1.1/pyproject.toml +54 -0
- echostatenetwork-0.1.1/setup.cfg +4 -0
- echostatenetwork-0.1.1/tests/test_esn_core.py +271 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Andrea Nóvoa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include tests *.py
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: echostatenetwork
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Echo state networks / reservoir computing in pure numpy: ridge training, recycle validation, ragged segments, parametric inputs, Bayesian hyperparameter search
|
|
5
|
+
Author-email: Andrea Nóvoa <a.novoa@imperial.ac.uk>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/andreanovoa/EchoStateNetwork
|
|
8
|
+
Project-URL: Repository, https://github.com/andreanovoa/EchoStateNetwork
|
|
9
|
+
Project-URL: Issues, https://github.com/andreanovoa/EchoStateNetwork/issues
|
|
10
|
+
Keywords: echo-state-network,reservoir-computing,time-series,recurrent-network
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: matplotlib<4.0,>=3.9
|
|
18
|
+
Requires-Dist: numpy<3.0,>=2.0
|
|
19
|
+
Requires-Dist: scipy<2.0,>=1.13
|
|
20
|
+
Provides-Extra: opt
|
|
21
|
+
Requires-Dist: scikit-optimize>=0.9; extra == "opt"
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8.4; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff; extra == "dev"
|
|
25
|
+
Requires-Dist: scikit-optimize>=0.9; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# EchoStateNetwork
|
|
29
|
+
|
|
30
|
+
Echo state networks / reservoir computing in pure numpy. One class,
|
|
31
|
+
`EchoStateNetwork`: ridge-regression training with chaotic recycle validation
|
|
32
|
+
(contiguous runs or ragged dwell segments), parametric inputs, optional Bayesian
|
|
33
|
+
hyperparameter search (`scikit-optimize`), closed-loop prediction, and Jacobians
|
|
34
|
+
for data assimilation.
|
|
35
|
+
|
|
36
|
+
This is the single shared reservoir core behind
|
|
37
|
+
[`qlrom`](https://github.com/andreanovoa/qlrom) (quantized-local ESN families) and
|
|
38
|
+
[`romda`](https://github.com/andreanovoa/romda) (real-time ESN forecasting and
|
|
39
|
+
bias-aware data assimilation).
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install echostatenetwork # core (numpy/scipy/matplotlib)
|
|
45
|
+
pip install "echostatenetwork[opt]" # + scikit-optimize for Bayesian hyperparameter search
|
|
46
|
+
pip install -e ".[dev]" # development
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quickstart
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import numpy as np
|
|
53
|
+
from echostatenetwork import EchoStateNetwork
|
|
54
|
+
|
|
55
|
+
y = my_time_series # (Nt, N_dim)
|
|
56
|
+
esn = EchoStateNetwork(y, dt=0.01, N_units=200, t_train=40.0, t_val=4.0)
|
|
57
|
+
esn.train([y])
|
|
58
|
+
u_wash, r = ... # see docstrings: washout then closed loop
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Acknowledgements
|
|
62
|
+
|
|
63
|
+
This repository is based on
|
|
64
|
+
[alberacca/Echo-State-Networks](https://github.com/alberacca/Echo-State-Networks),
|
|
65
|
+
the reference implementation of the recycle-validation ESN:
|
|
66
|
+
|
|
67
|
+
> Racca, A., & Magri, L. (2021). Robust optimization and validation of echo state
|
|
68
|
+
> networks for learning chaotic dynamics. *Neural Networks*, 142, 252-268.
|
|
69
|
+
> [doi:10.1016/j.neunet.2021.05.004](https://doi.org/10.1016/j.neunet.2021.05.004)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# EchoStateNetwork
|
|
2
|
+
|
|
3
|
+
Echo state networks / reservoir computing in pure numpy. One class,
|
|
4
|
+
`EchoStateNetwork`: ridge-regression training with chaotic recycle validation
|
|
5
|
+
(contiguous runs or ragged dwell segments), parametric inputs, optional Bayesian
|
|
6
|
+
hyperparameter search (`scikit-optimize`), closed-loop prediction, and Jacobians
|
|
7
|
+
for data assimilation.
|
|
8
|
+
|
|
9
|
+
This is the single shared reservoir core behind
|
|
10
|
+
[`qlrom`](https://github.com/andreanovoa/qlrom) (quantized-local ESN families) and
|
|
11
|
+
[`romda`](https://github.com/andreanovoa/romda) (real-time ESN forecasting and
|
|
12
|
+
bias-aware data assimilation).
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install echostatenetwork # core (numpy/scipy/matplotlib)
|
|
18
|
+
pip install "echostatenetwork[opt]" # + scikit-optimize for Bayesian hyperparameter search
|
|
19
|
+
pip install -e ".[dev]" # development
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quickstart
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
import numpy as np
|
|
26
|
+
from echostatenetwork import EchoStateNetwork
|
|
27
|
+
|
|
28
|
+
y = my_time_series # (Nt, N_dim)
|
|
29
|
+
esn = EchoStateNetwork(y, dt=0.01, N_units=200, t_train=40.0, t_val=4.0)
|
|
30
|
+
esn.train([y])
|
|
31
|
+
u_wash, r = ... # see docstrings: washout then closed loop
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Acknowledgements
|
|
35
|
+
|
|
36
|
+
This repository is based on
|
|
37
|
+
[alberacca/Echo-State-Networks](https://github.com/alberacca/Echo-State-Networks),
|
|
38
|
+
the reference implementation of the recycle-validation ESN:
|
|
39
|
+
|
|
40
|
+
> Racca, A., & Magri, L. (2021). Robust optimization and validation of echo state
|
|
41
|
+
> networks for learning chaotic dynamics. *Neural Networks*, 142, 252-268.
|
|
42
|
+
> [doi:10.1016/j.neunet.2021.05.004](https://doi.org/10.1016/j.neunet.2021.05.004)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Echo state networks / reservoir computing, pure numpy.
|
|
2
|
+
|
|
3
|
+
One class, EchoStateNetwork: training (ridge regression with recycle validation,
|
|
4
|
+
contiguous or ragged dwell segments), Bayesian hyperparameter search (optional
|
|
5
|
+
scikit-optimize), parametric inputs, closed-loop prediction and Jacobians.
|
|
6
|
+
Shared by the qlrom (qlESN families) and romda (ESN_model, ESN_bias) packages.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from .esn import EchoStateNetwork
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.1"
|
|
12
|
+
|
|
13
|
+
__all__ = ["EchoStateNetwork"]
|