Pipeline

Stability: Stable

What it is

Use Pipeline to chain reusable preprocessing transforms and apply them deterministically to time-series-like data.

Representative Signatures

Pipeline(steps=[("impute", ImputeTransform()), ("standardize", StandardizeTransform())])
Pipeline.fit_transform(x)

Minimal Example

from gwexpy.timeseries import Pipeline, ImputeTransform, StandardizeTransform

pipeline = Pipeline([("impute", ImputeTransform()), ("standardize", StandardizeTransform())])
out = pipeline.fit_transform(ts_matrix)

API Reference

The detailed generated API continues below on this page.

Inherits from: object

Sequentially apply a list of transforms.

Methods

__init__

__init__(self, steps: Sequence[Tuple[str, gwexpy.timeseries.pipeline.Transform]])

Initialize pipeline with named transform steps.

Parameters

steps : list of (name, Transform) tuples Sequence of transforms to apply.

fit

fit(self, x)

Fit all transforms in sequence.

fit_transform

fit_transform(self, x)

Fit and transform in one step.

inverse_transform

inverse_transform(self, y, *, strict: bool = True)

Apply inverse transforms in reverse order.

Parameters

y : data Transformed data. strict : bool, optional If True, raise error if any step doesn’t support inverse.

transform

transform(self, x)

Apply all transforms in sequence.