PipelineElement#

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

Bases: Protocol

The basic pipeline building block

__init__(*args, **kwargs)[source]#
get_input_schema() → Schema | None[source]#

Return the schema of instances this element expects to receive.

Defaults to get_schema(), which is correct for every element that does not alter the attribute set.

get_schema() → Schema | None[source]#

Return the schema of instances leaving this element.

Returns None when the element neither knows nor alters the schema – a drift detector, for instance. The default is None so that existing PipelineElement implementations keep working unchanged.

abstract pass_forward(
instance: Instance,
) → Instance[source]#
abstract pass_forward_predict(
instance: Instance,
prediction=None,
) → tuple[Instance, Any][source]#