I envision in the code somewhere, there could be a check, something like:
if isinstance(self.estimator, sklearn.pipeline.Pipeline():
self.estimator = self.estimator['estimator']
That way, it could parse the base estimator from the pipeline and the rest of the code could work, but it's nice to know that feature scaling is working properly when using cross validation. Proper scaling would be to scale the training folds first, then transform the testing fold, which all happens within the CV itself. So using a pipeline with SKLearn would allow this?
Hi @windowshopr , this is already possible in sklearn-genetic-opt, the transformations are applied in each of the folds, you can see an example here on how to use pipelines with this package.
Would be cool to see GASearchCV allow SKLearn Pipeline objects into the mix as well. For example:
I envision in the code somewhere, there could be a check, something like:
That way, it could parse the base estimator from the pipeline and the rest of the code could work, but it's nice to know that feature scaling is working properly when using cross validation. Proper scaling would be to scale the training folds first, then transform the testing fold, which all happens within the CV itself. So using a pipeline with SKLearn would allow this?