-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Closed
Description
Describe the workflow you want to enable
The fit function of both sklearn.pipeline.Pipeline and sklearn.pipeline.FeatureUnion supports **fit_params:
def fit(X, y=None, **fit_params):
...Citing the documentation:
`**fit_params : dict of string -> object
Parameters passed to the fit method of each step, where each parameter name is prefixed such that parameter p for step s has key s__p.
Conversely, sklearn.compose.ColumnTransformer does not support fit_params:
def fit(X, y=None):
...As far as I'm aware, it is therefore not possible to pass fit parameters to the individual column transforms.
Describe your proposed solution
The fit function of sklearn.compose.ColumnTransformer should support fit_params, using the same logic as sklearn.pipeline.Pipeline:
def fit(X, y=None, **fit_params):
...Describe alternatives you've considered, if relevant
No response
Additional context
No response