lacava / few

a feature engineering wrapper for sklearn
https://lacava.github.io/few
GNU General Public License v3.0
50 stars 22 forks source link

GridSearchCV error #31

Closed lacava closed 6 years ago

lacava commented 6 years ago

Concerning errors of the form

self.ml.named_steps = undefined
    205                   hasattr(self.ml.named_steps['ml'],'feature_importances_')):
    208                 coef = (self.ml.named_steps['ml'].coef_ if
AttributeError: 'SGDClassifier' object has no attribute 'named_steps'

when using FEW in GridSearchCV while changing the ML parameter. The pipeline object needs to be redefined in the fit method so that GridSearch can change self.ml and the pipeline gets updated.

lacava commented 6 years ago

see #32