Comments (7)
Hello,
Thank you for reporting this error. Could you provide the code of the objective function you are trying to run ? The error probably comes from one of the values inserted in the returned dictionary. Are your results correctly saved as JSON files ?
from reservoirpy.
Sorry cannot post the whole thing.
But i was returning return {'loss': np.mean(losses)}
from reservoirpy.
It writes a json file with this:
{"returned_dict": {"loss": 842.2902508909732, "status": "ok", "start_time": 1635807096.9917843, "duration": 24.424065113067627}, "current_params": {"N":
This is the hyperopt config:
hyperopt_config = {
"exp": f"{experimentation_no}-hyperopt",
"hp_max_evals": 200, # the number of differents sets of parameters hyperopt has to try
"hp_method": "random", # the method used by hyperopt to chose those sets (see below)
"instances_per_trial": 1, # how many random ESN will be tried with each sets of parameters
"hp_space": { # what are the ranges of parameters explored
"N": ["randint", 4950, 5050], # the number of neurons is fixed to 300
"sr": ["uniform", 0.9, 0.999], # the spectral radius is log-uniformly distributed between 1e-6 and 10
"leak": ["uniform", 1e-3, 1], # idem with the leaking rate, from 1e-3 to 1
"iss": ["uniform", 0.5, 0.9], # the input scaling is fixed
"ridge": ["uniform",1e-10, 1e-3], # and so is the regularization parameter.
"seed": ["choice", 1234] # an other random seed for the ESN initialization
}
}
It looks like the first variable "N" is being stored as an numpy int64.
from reservoirpy.
In this case, could you try to explicitely cast "N" to Python int
type with N = int(...)
? Be carefull that your loss and everything you store in the result dictionary are also native Python types, and not Numpy arrays. Numpy sometimes returns unidimensional arrays instead of scalars.
from reservoirpy.
remarks on your search space:
- did you train running on just 1000 units in the reservoir N = 1000 instead of setting it at 5000 which can be difficult to compute depending on your computer resources.
- for all variables where you put "uniform" I would advise to put "loguniform" instead, because all these variable have this kind of log-scale sensitivity
- restricting spectral radius (SR) to [0.9, 1.] is very narrow, we advise to explore it in [10^-2 ; 10^1], like the input scaling (iss), or to fix one of those.
You can refer to our recent paper on advices on hyperparameter search for reservoirs:
"Which Hype for My New Task? Hints and Random Search for Echo State Networks Hyperparameters", ICANN 2021
https://link.springer.com/chapter/10.1007/978-3-030-86383-8_7
with a preprint version here:
https://hal.inria.fr/hal-03203318/
from reservoirpy.
Thanks for your advice. I'm not using hyperopt anymore though and I changed my code around a bit so I cannot test your solution but the memory leak issue is prominent.
from reservoirpy.
I am closing this issue as the problem seems to be solved. Let us know if it is not the case.
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.