ertk.transform.GroupTransformWrapper
- class ertk.transform.GroupTransformWrapper(transformer: TransformerMixin)
Bases:
TransformerMixin,BaseEstimatorTransform that modifies groups independently without storing parameters.
- __init__(transformer: TransformerMixin) None
Methods
__init__(transformer)fit(X[, y])set_transform_request(*[, groups])Request metadata passed to the
transformmethod.transform(X[, groups])Inherited Methods
fit_transform(X[, y])Fit to data, then transform it.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
set_output(*[, transform])Set output container.
set_params(**params)Set the parameters of this estimator.
- set_transform_request(*, groups: bool | None | str = '$UNCHANGED$') GroupTransformWrapper
Request metadata passed to the
transformmethod.Note that this method is only relevant if
enable_metadata_routing=True(seesklearn.set_config()). Please see User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed totransformif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it totransform.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.New in version 1.3.
Note
This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a
Pipeline. Otherwise it has no effect.- Parameters:
- groupsstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED
Metadata routing for
groupsparameter intransform.
- Returns:
- selfobject
The updated object.