Comments (2)
Hello Peter !
For now, memmap are required to use the Ridge node, as it was designed to allow parallel computation of linear regression. This parallel computation relies on shared arrays between processes, and the only safe and easy way to do this is to use memory mapped objects. This behavior will probably change in the future, as memory mapped arrays are not well supported on all platforms.
Could you provide a more explicit example of what you are trying to do?
Also, thank you very much for your interest in ReservoirPy. As adding a scikit-learn adapter is part of the library future features plan, do not hesitate to ask for help, submit your code through a pull request and suggest any change in the current code. We would be really happy to count you among the contributors!
from reservoirpy.
Hi Nathan!
Thanks for your explanation. I already thought that this was the reason for using memory mapping.
In PyRCN, we use base objects (scikit-learn BaseEstimator etc.) to define our building blocks. The advantage is now that we can use e.g. RandomizedSearchCV for hyperparameter tuning.
A very simple example of what I want to do is the following code snippet (from RandomizedSearchCV):
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import RandomizedSearchCV
from scipy.stats import uniform
iris = load_iris()
logistic = LogisticRegression(solver='saga', tol=1e-2, max_iter=200,
random_state=0)
distributions = dict(C=uniform(loc=0, scale=4),
penalty=['l2', 'l1'])
clf = RandomizedSearchCV(logistic, distributions, random_state=0) # TODO: replace logistic by an ESN
search = clf.fit(iris.data, iris.target)
search.best_params_
Now, I need an adapter so that I can replace logistic
by an ESN from reservoirpy. And this seems to work fine for everything but the memory mapping. The problem, is that RandomizedSearchCV
copies the object to get optimized. I assume that now multiple instances are trying to access the memmapped files in the same time.
Do you have an offline regression node that allows to sequentially fit the linear regression? This would already solve my problem.
Regarding your future plan to add an adapter between reservoirpy and scikit-learn - I will definitely provide you the adapter as soon as it works.
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.