neuraxle.steps.column_transformer

Neuraxle’s Column Transformer Steps

Pipeline steps to apply N-Dimensional column transformations to different columns.

Classes

ColumnSelector2D(columns_selection, …)

A ColumnSelector2D selects column in a sequence.

ColumnTransformer(…)

A ColumnChooser can apply custom transformations to different columns.

ColumnsSelectorND(columns_selection[, …])

ColumnSelectorND wraps a ColumnSelector2D by as many ForEachDataInput step as needed to select the last dimension.

class neuraxle.steps.column_transformer.ColumnSelector2D(columns_selection: Union[Tuple[int, neuraxle.base.BaseStep], Tuple[List[int], neuraxle.base.BaseStep], Tuple[slice, neuraxle.base.BaseStep]])[source]

A ColumnSelector2D selects column in a sequence.

transform(data_inputs)[source]

Transform given data inputs.

Parameters

data_inputs – data inputs

Returns

transformed data inputs

class neuraxle.steps.column_transformer.ColumnTransformer(column_chooser_steps_as_tuple: List[Union[Tuple[int, neuraxle.base.BaseStep], Tuple[List[int], neuraxle.base.BaseStep], Tuple[slice, neuraxle.base.BaseStep]]], n_dimension: int = 3)[source]

A ColumnChooser can apply custom transformations to different columns. The ColumnChooser accepts a list of tuples for the transformations, and will name the steps accordingly (because of the TruncableSteps’ constructor) by converting each indexer object to a string. Indexer objects can be ranges, an int, or a list of ints. The input data can be N-dimensionnal (ND), in which case the axis must be specified. The columns data passed to the sub-steps will still be ND.

Usage example:

ColumnChooser([
    (range(0, 2), CyclicTimes()),
    (3, CategoricalEnum(categories_count=5, starts_at_zero=True)),
    (4, CategoricalEnum(categories_count=5, starts_at_zero=True)),
    ([10, 13, 15], CategoricalEnum(categories_count=5, starts_at_zero=True)),
])

See also

FeatureUnion,

class neuraxle.steps.column_transformer.ColumnsSelectorND(columns_selection, n_dimension=3)[source]

ColumnSelectorND wraps a ColumnSelector2D by as many ForEachDataInput step as needed to select the last dimension.