RegressorPipelineElement#

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

Bases: PipelineElement

Pipeline element that wraps around a regressor

__init__(learner: Regressor)[source]#

Initializes the pipeline element with a regressor.

Parameters#

learner: Regressor

The regressor associated with this pipeline element.

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

Trains the learner on the provided instance; then returns the instance.

Parameters#

instance: Instance

An instance to train the learner

Returns#

Instance

The instance that was provided to the function

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

Trains the learner on the provided instance; then returns the instance.

Parameters#

instance: Instance

An instance to train the learner

prediction: Any

Most likely None, but could be anything in principle

Returns#

Tuple[Instance, Any]

The transformed instance and the prediction of the regressor