TransformerPipelineElement#

class capymoa.stream.preprocessing.TransformerPipelineElement[source]#

Bases: PipelineElement

Pipeline element that wraps around a transformer

__init__(
transformer: Transformer,
)[source]#

Initializes the pipeline element with a transformer.

Parameters#

transformer: Transformer

The transformer associated with this pipeline element.

pass_forward(
instance: Instance,
) Instance[source]#

Transforms and returns the provided instance.

Parameters#

instance: Instance

The input instance

Returns#

instance: Instance

The transformed instance

pass_forward_predict(
instance: Instance,
prediction: Any = None,
) Tuple[Instance, Any][source]#

Transforms and returns the provided instance. Also returns the prediction that was provided.

Parameters#

instance: Instance

The input instance

prediction: Any

Most likely None, but could be anything.

Returns#

Tuple[Instance, Any]

The transformed instance and the prediction that was provided