FeaturesPipeline

class lightautoml.pipelines.features.base.FeaturesPipeline(**kwargs)[source]

Bases: object

Abstract class.

Analyze train dataset and create composite transformer based on subset of features. Instance can be interpreted like Transformer (look for LAMLTransformer) with delayed initialization (based on dataset metadata) Main method, user should define in custom pipeline is .create_pipeline. For example, look at LGBSimpleFeatures. After FeaturePipeline instance is created, it is used like transformer with .fit_transform and .transform method.

property input_features

Names of input features of train data.

property output_features

List of feature names that produces _pipeline.

property used_features

List of feature names from original dataset that was used to produce output.

create_pipeline(train)[source]

Analyse dataset and create composite transformer.

Parameters:

train (LAMLDataset) – Dataset with train data.

Return type:

LAMLTransformer

Returns: # noqa DAR202

Composite transformer (pipeline).

fit_transform(train)[source]

Create pipeline and then fit on train data and then transform.

Parameters:

train (LAMLDataset) – Dataset with train data.

Return type:

LAMLDataset

Returns:

Dataset with new features.

transform(test)[source]

Apply created pipeline to new data.

Parameters:

test (LAMLDataset) – Dataset with test data.

Return type:

LAMLDataset

Returns:

Dataset with new features.