Module compose (1.12.0)

Build composite transformers on heterogeneous data. This module is styled after scikit-Learn's compose module: https://scikit-learn.org/stable/modules/classes.html#module-sklearn.compose.

Classes

ColumnTransformer

ColumnTransformer(
    transformers: typing.Iterable[
        typing.Tuple[
            str,
            typing.Union[
                bigframes.ml.preprocessing.OneHotEncoder,
                bigframes.ml.preprocessing.StandardScaler,
                bigframes.ml.preprocessing.MaxAbsScaler,
                bigframes.ml.preprocessing.MinMaxScaler,
                bigframes.ml.preprocessing.KBinsDiscretizer,
                bigframes.ml.preprocessing.LabelEncoder,
                bigframes.ml.preprocessing.PolynomialFeatures,
                bigframes.ml.impute.SimpleImputer,
            ],
            typing.Union[str, typing.Iterable[str]],
        ]
    ]
)

Applies transformers to columns of BigQuery DataFrames.

This estimator allows different columns or column subsets of the input to be transformed separately, and the features generated by each transformer will be concatenated to form a single feature space. This is useful for heterogeneous or columnar data to combine several feature extraction mechanisms or transformations into a single transformer.