I want to add target variable transformers into my sklearn pipeline. Usually for operations like PCA or any kind of regressors-classifiers, sklearn supports parameter grids for CV like:
param_grid = [{
"pca__n_components": [5, 10, 25, 50, 125, 250, 625, 1500, 3000],
"rdf__n_estimators": n_estimators,
"rdf__bootstrap": bootstrap,
"rdf__max_depth": max_depth,
"rdf__class_weight": class_weight}]
Is it possible to add variable transformers to this grid, too? For example, I want to train my regressor first without transforming the target variable and then using PowerTransformer()
, I want to scale my target variable and want to see if it improves my results. Is it possible to integrate these into the parameter grid, too?