ColumnEnsembleTransformer#

class ColumnEnsembleTransformer(transformers)[source]#

Column-wise application of transformers.

Applies transformations to columns of an array or pandas DataFrame. Simply takes the column transformer from sklearn and adds capability to handle pandas dataframe.

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.

Parameters
transformerssktime trafo, or list of tuples (str, estimator, int or pd.index)

if tuples, with name = str, estimator is transformer, index as int or index if last element is index, it must be int, str, or pd.Index coercable if last element is int x, and is not in columns, is interpreted as x-th column all columns must be present in an index

If transformer, clones of transformer are applied to all columns. If list of tuples, transformer in tuple is applied to column with int/str index

Attributes
transformers_list

The collection of fitted transformations as tuples of (name, fitted_transformer, column). fitted_transformer can be an estimator, “drop”, or “passthrough”. In case there were no columns selected, this will be the unfitted transformer. If there are remaining columns, the final element is a tuple of the form: (“remainder”, transformer, remaining_columns) corresponding to the remainder parameter. If there are remaining columns, then len(transformers_)==len(transformations)+1, otherwise len(transformers_)==len(transformations).

Methods

get_params([deep])

Get parameters of estimator.

get_test_params()

Return testing parameter settings for the estimator.

is_composite()

Check if the object is composite.

set_params(**kwargs)

Set the parameters of estimator.

classmethod get_test_params()[source]#

Return testing parameter settings for the estimator.

Returns
paramsdict or list of dict, default = {}

Parameters to create testing instances of the class Each dict are parameters to construct an “interesting” test instance, i.e., MyClass(**params) or MyClass(**params[i]) creates a valid test instance. create_test_instance uses the first (or only) dictionary in params

get_params(deep=True)[source]#

Get parameters of estimator.

Parameters
deepboolean, optional

If True, will return the parameters for this estimator and contained sub-objects that are estimators.

Returns
paramsmapping of string to any

Parameter names mapped to their values.

is_composite()[source]#

Check if the object is composite.

A composite object is an object which contains objects, as parameters. Called on an instance, since this may differ by instance.

Returns
composite: bool, whether self contains a parameter which is BaseObject
set_params(**kwargs)[source]#

Set the parameters of estimator.

Valid parameter keys can be listed with get_params().

Returns
selfreturns an instance of self.