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, thenlen(transformers_)==len(transformations)+1
, otherwiselen(transformers_)==len(transformations)
.
Methods
get_params
([deep])Get parameters of estimator.
Return testing parameter settings for the estimator.
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.