-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
It is currently not possible to use the scikit-learn GridSearchCV module with estimators from Parsimony because the method get_params
is not compatible:
import parsimony.estimators as estimators
from sklearn.model_selection import GridSearchCV
rr = estimators.RidgeRegression(l=1.0)
param = {'ridgeregression__l': [0.2 * k for k in range(6)]}
grid_search = GridSearchCV(estimator=rr, param_grid=param, cv=5)
grid_search.fit(Xtr, ytr)
Traceback (most recent call last):
File "<ipython-input-51-4f6ebd276276>", line 8, in <module>
grid_search.fit(Xtr, ytr)
File "/home/python-environments/env/lib/python2.7/site-packages/sklearn/model_selection/_search.py", line 625, in fit
base_estimator = clone(self.estimator)
File "/home/python-environments/env/lib/python2.7/site-packages/sklearn/base.py", line 60, in clone
new_object_params = estimator.get_params(deep=False)
TypeError: get_params() got an unexpected keyword argument 'deep'
This could be fixed adding the parameter deep
and as in scikit-learn:
dankessler
Metadata
Metadata
Assignees
Labels
No labels