Hey all,
When using the ensemble classifiers as part of a grid search, is there any way of searching over the parameters of the ensembler itself, rather than just its
first level classifiers?
For example, with the StackingCVClassifier it may be interesting to see if using the class probabilities instead of the hard classes makes a difference.
Adapting the documented example:
sclf = StackingCVClassifier(classifiers=[clf1, clf2],
meta_classifier=lr)
params = {'use_probas': [True, False], # add the use_probas parameter to the search space
'kneighborsclassifier__n_neighbors': [1, 5],
'randomforestclassifier__n_estimators': [10, 50],
'meta-logisticregression__C': [0.1, 10.0]}
grid = GridSearchCV(estimator=sclf,
param_grid=params,
cv=5,
refit=True)
This however gives me an invalid parameter error:
ValueError: Invalid parameter use_probas for estimator StackingCVClassifier. Check the list of available parameters with `estimator.get_params().keys()`.
Am I missing something obvious?
Thanks,
Tom