1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
%global _empty_manifest_terminate_build 0
Name: python-rctorchprivate
Version: 0.9819998
Release: 1
Summary: A Python 3 toolset for creating and optimizing Echo State Networks. This library is an extension and expansion of the previous library written by Reinier Maat: https://github.com/1Reinier/Reservoir
License: Harvard
URL: https://github.com/blindedjoy/RcTorch-private
Source0: https://mirrors.aliyun.com/pypi/web/packages/bf/70/4da4e6d44e451dd964b55b1b4b5e7d2dab919609d4168920ab5dc4090970/rctorchprivate-0.9819998.tar.gz
BuildArch: noarch
%description
A Pytorch toolset for creating and optimizing Echo State Networks.
>License: 2020-2021 MIT
>Authors: Hayden Joy, Marios Mattheakis
Contains:
- A ESN Reservoir architecture class "rc.py"
- Bayesian Optimization (BO) class "rc_bayes.py" with optimized routines for Echo State Nets through `Botorch` (GPU optimized), can train multiple RCs in parellel durring BO
- an implimentation of the TURBO-1 algorithm as outlined in this paper: https://github.com/uber-research/TuRBO
- Capable of solving differential equations (the population equation, the bernoulli equation, a simple harmonic oscillator and a nonlinear oscillator)
Reference to prior instantiation:
This library is an extension and expansion of a previous library written by Reinier Maat: https://github.com/1Reinier/Reservoir
2018 International Joint Conference on Neural Networks (IJCNN), pp. 1-7. IEEE, 2018
https://arxiv.org/abs/1903.05071
## For example usage please see the notebooks folder.
# Installation
## Using pip
Like most standard libraries, `rctorch` is hosted on [PyPI](https://pypi.org/project/RcTorch/). To install the latest stable relesase,
```bash
pip install -U rctorch # '-U' means update to latest version
```
## Example Usages
### Imports
```python
from rctorch import *
import torch
```
### Load data
RcTorch has several built in datasets. Among these is the forced pendulum dataset. Here we demonstrate
```python
fp_data = rctorch.data.load("forced_pendulum", train_proportion = 0.2)
force_train, force_test = fp_data["force"]
target_train, input_test = fp_data["target"]
#Alternatively you can use sklearn's train_test_split.
```
### Hyper-parameters
```python
#declare the hyper-parameters
>>> hps = {'connectivity': 0.4,
'spectral_radius': 1.13,
'n_nodes': 202,
'regularization': 1.69,
'leaking_rate': 0.0098085,
'bias': 0.49}
```
### Setting up your very own EchoStateNetwork
```python
my_rc = RcNetwork(**hps, random_state = 210, feedback = True)
#fitting the data:
my_rc.fit(y = target_train)
#making our prediction
score, prediction = my_rc.test(y = target_test)
my_rc.combined_plot()
```

Feedback allows the network to feed in the prediction at the previous timestep as an input. This helps the RC to make longer and more stable predictions in many situations.
### Bayesian Optimization
Unlike most other reservoir neural network packages ours offers the automatically tune hyper-parameters.
```python
#any hyper parameter can have 'log_' in front of it's name. RcTorch will interpret this properly.
bounds_dict = {"log_connectivity" : (-2.5, -0.1),
"spectral_radius" : (0.1, 3),
"n_nodes" : (300,302),
"log_regularization" : (-3, 1),
"leaking_rate" : (0, 0.2),
"bias": (-1,1),
}
rc_specs = {"feedback" : True,
"reservoir_weight_dist" : "uniform",
"output_activation" : "tanh",
"random_seed" : 209}
rc_bo = RcBayesOpt(bounds = bounds_dict,
scoring_method = "nmse",
n_jobs = 1,
cv_samples = 3,
initial_samples= 25,
**rc_specs
)
```
%package -n python3-rctorchprivate
Summary: A Python 3 toolset for creating and optimizing Echo State Networks. This library is an extension and expansion of the previous library written by Reinier Maat: https://github.com/1Reinier/Reservoir
Provides: python-rctorchprivate
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-rctorchprivate
A Pytorch toolset for creating and optimizing Echo State Networks.
>License: 2020-2021 MIT
>Authors: Hayden Joy, Marios Mattheakis
Contains:
- A ESN Reservoir architecture class "rc.py"
- Bayesian Optimization (BO) class "rc_bayes.py" with optimized routines for Echo State Nets through `Botorch` (GPU optimized), can train multiple RCs in parellel durring BO
- an implimentation of the TURBO-1 algorithm as outlined in this paper: https://github.com/uber-research/TuRBO
- Capable of solving differential equations (the population equation, the bernoulli equation, a simple harmonic oscillator and a nonlinear oscillator)
Reference to prior instantiation:
This library is an extension and expansion of a previous library written by Reinier Maat: https://github.com/1Reinier/Reservoir
2018 International Joint Conference on Neural Networks (IJCNN), pp. 1-7. IEEE, 2018
https://arxiv.org/abs/1903.05071
## For example usage please see the notebooks folder.
# Installation
## Using pip
Like most standard libraries, `rctorch` is hosted on [PyPI](https://pypi.org/project/RcTorch/). To install the latest stable relesase,
```bash
pip install -U rctorch # '-U' means update to latest version
```
## Example Usages
### Imports
```python
from rctorch import *
import torch
```
### Load data
RcTorch has several built in datasets. Among these is the forced pendulum dataset. Here we demonstrate
```python
fp_data = rctorch.data.load("forced_pendulum", train_proportion = 0.2)
force_train, force_test = fp_data["force"]
target_train, input_test = fp_data["target"]
#Alternatively you can use sklearn's train_test_split.
```
### Hyper-parameters
```python
#declare the hyper-parameters
>>> hps = {'connectivity': 0.4,
'spectral_radius': 1.13,
'n_nodes': 202,
'regularization': 1.69,
'leaking_rate': 0.0098085,
'bias': 0.49}
```
### Setting up your very own EchoStateNetwork
```python
my_rc = RcNetwork(**hps, random_state = 210, feedback = True)
#fitting the data:
my_rc.fit(y = target_train)
#making our prediction
score, prediction = my_rc.test(y = target_test)
my_rc.combined_plot()
```

Feedback allows the network to feed in the prediction at the previous timestep as an input. This helps the RC to make longer and more stable predictions in many situations.
### Bayesian Optimization
Unlike most other reservoir neural network packages ours offers the automatically tune hyper-parameters.
```python
#any hyper parameter can have 'log_' in front of it's name. RcTorch will interpret this properly.
bounds_dict = {"log_connectivity" : (-2.5, -0.1),
"spectral_radius" : (0.1, 3),
"n_nodes" : (300,302),
"log_regularization" : (-3, 1),
"leaking_rate" : (0, 0.2),
"bias": (-1,1),
}
rc_specs = {"feedback" : True,
"reservoir_weight_dist" : "uniform",
"output_activation" : "tanh",
"random_seed" : 209}
rc_bo = RcBayesOpt(bounds = bounds_dict,
scoring_method = "nmse",
n_jobs = 1,
cv_samples = 3,
initial_samples= 25,
**rc_specs
)
```
%package help
Summary: Development documents and examples for rctorchprivate
Provides: python3-rctorchprivate-doc
%description help
A Pytorch toolset for creating and optimizing Echo State Networks.
>License: 2020-2021 MIT
>Authors: Hayden Joy, Marios Mattheakis
Contains:
- A ESN Reservoir architecture class "rc.py"
- Bayesian Optimization (BO) class "rc_bayes.py" with optimized routines for Echo State Nets through `Botorch` (GPU optimized), can train multiple RCs in parellel durring BO
- an implimentation of the TURBO-1 algorithm as outlined in this paper: https://github.com/uber-research/TuRBO
- Capable of solving differential equations (the population equation, the bernoulli equation, a simple harmonic oscillator and a nonlinear oscillator)
Reference to prior instantiation:
This library is an extension and expansion of a previous library written by Reinier Maat: https://github.com/1Reinier/Reservoir
2018 International Joint Conference on Neural Networks (IJCNN), pp. 1-7. IEEE, 2018
https://arxiv.org/abs/1903.05071
## For example usage please see the notebooks folder.
# Installation
## Using pip
Like most standard libraries, `rctorch` is hosted on [PyPI](https://pypi.org/project/RcTorch/). To install the latest stable relesase,
```bash
pip install -U rctorch # '-U' means update to latest version
```
## Example Usages
### Imports
```python
from rctorch import *
import torch
```
### Load data
RcTorch has several built in datasets. Among these is the forced pendulum dataset. Here we demonstrate
```python
fp_data = rctorch.data.load("forced_pendulum", train_proportion = 0.2)
force_train, force_test = fp_data["force"]
target_train, input_test = fp_data["target"]
#Alternatively you can use sklearn's train_test_split.
```
### Hyper-parameters
```python
#declare the hyper-parameters
>>> hps = {'connectivity': 0.4,
'spectral_radius': 1.13,
'n_nodes': 202,
'regularization': 1.69,
'leaking_rate': 0.0098085,
'bias': 0.49}
```
### Setting up your very own EchoStateNetwork
```python
my_rc = RcNetwork(**hps, random_state = 210, feedback = True)
#fitting the data:
my_rc.fit(y = target_train)
#making our prediction
score, prediction = my_rc.test(y = target_test)
my_rc.combined_plot()
```

Feedback allows the network to feed in the prediction at the previous timestep as an input. This helps the RC to make longer and more stable predictions in many situations.
### Bayesian Optimization
Unlike most other reservoir neural network packages ours offers the automatically tune hyper-parameters.
```python
#any hyper parameter can have 'log_' in front of it's name. RcTorch will interpret this properly.
bounds_dict = {"log_connectivity" : (-2.5, -0.1),
"spectral_radius" : (0.1, 3),
"n_nodes" : (300,302),
"log_regularization" : (-3, 1),
"leaking_rate" : (0, 0.2),
"bias": (-1,1),
}
rc_specs = {"feedback" : True,
"reservoir_weight_dist" : "uniform",
"output_activation" : "tanh",
"random_seed" : 209}
rc_bo = RcBayesOpt(bounds = bounds_dict,
scoring_method = "nmse",
n_jobs = 1,
cv_samples = 3,
initial_samples= 25,
**rc_specs
)
```
%prep
%autosetup -n rctorchprivate-0.9819998
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-rctorchprivate -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.9819998-1
- Package Spec generated
|