Comments (10)
Hello @wilbertmatthew
Thank you for using reservoirpy.
Please make your question more explicit, you are asking several questions at the same time, and put link to the line code where you have an issue if you have one.
Thanks
from reservoirpy.
Thanks for your response.
Hope this clarifies my issue:
Issue 1: I train on 1-2000 values of the dataset and predict on 4000-4100 values of the dataset using code y_pred = model.fit(X, y).run(X_test). That works.
How would I run the app again, with same dataset or another dataset with a similar signal pattern, but only perform a prediction without training? That is can I save the model and prove that prediction is working on different datasets than the dataset used for training.
import matplotlib.pyplot as plt
import numpy as np
from reservoirpy.nodes import NVAR, Ridge
from reservoirpy.datasets import lorenz
from reservoirpy.datasets import mackey_glass
from reservoirpy.nodes import Input
import reservoirpy as rpy
rpy.verbosity(1)
nvar = NVAR(delay=2, order=2, strides=1)
readout = Ridge(1, ridge=2.5e-6)
model = nvar >> readout
tau = 17
data = mackey_glass(10000, tau=tau)
data = data.reshape(-1, 1)
VERBOSE = True
train_size = 2000
test_size = 2000
horizon = 1 # horizon p of the forecast (predict X[t+p] from X[t])
X = data[:train_size]
y = data[horizon : train_size + horizon]
X_test = data[train_size : train_size + test_size]
y_test = data[train_size + horizon : train_size + test_size + horizon]
normalize = True
if VERBOSE:
print("X, y dimensions", X.shape, y.shape)
print("X_test, y_test dimensions", X_test.shape, y_test.shape)
y_pred = model.fit(X, y).run(X_test)
plt.figure(figsize=(12, 4))
plt.plot(y_pred, color="red", lw=1.5, label="Predictions")
plt.plot(y_test, color="blue", lw=0.75, label="Ground truth")
plt.title("Output predictions against real timeseries")
plt.legend()
plt.show()
from reservoirpy.
How would I run the app again, with same dataset or another dataset with a similar signal pattern, but only perform a prediction without training?
since you already trained the model:
y_pred = model.fit(X, y).run(X_test)
you just need to do:
y_pred_newdata = model.run(X_test_newdata)
Does it answer your question?
from reservoirpy.
from reservoirpy.
from reservoirpy.
Bonjour,
Comment importer la série de Lorenz 3d pour faire une prédiction
from reservoirpy.
Hello @Mervira,
You can just import it from the datasets
module, please refer to documentation for more information.
from reservoirpy.
from reservoirpy.
from reservoirpy.
Hello @Mervira,
Please open new issues when you have unrelated questions. I will try answer both here for now:
- Your first question is a matplotlib (or whatever plotting tool you use) problem. If you want 3 different plots, simply create 3 different figures, one with each variable of the dataset (x[:, 0], x[:, 1] and x[:, 2], x being your Lorenz series array)
- Your second question is raspberry problem. If your raspberry has an operating system with Python 3.8 or higher installed on it, then it should work. Raspberry are just tiny computers.
from reservoirpy.
Related Issues (20)
- Potential Error in Documentation HOT 1
- Segfault in classification notebook HOT 5
- Save/Load to/from disk HOT 2
- No warning is triggered when non-existing variable name is used
- Autograd - Feature Request HOT 1
- Mmap error with local parallelization with optuna from the tutorial HOT 1
- datasets.narma doesn't return input series HOT 5
- ValueError: Missing input data for node Reservoir-0.
- Fitting a model on non-temporal data HOT 1
- Feature Importance HOT 4
- Small-world reservoir matrices
- Rank list of degree of influence of input variables HOT 1
- I trying to forecast using reservoirpy HOT 1
- how to save and load a prediction model HOT 2
- Is the long term forecasting example opertion explanation correct HOT 3
- Understand and optimize ESN hyperparameters errors HOT 3
- cant do long term forecasting on yahoo stock market data HOT 4
- Creating a reservoir of custom nodes HOT 2
- LMS doesn't work for single node readout HOT 1
- ESN Parameter Effects HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reservoirpy.