RegressorPipelineElement#
- class capymoa.stream.preprocessing.RegressorPipelineElement[source]#
Bases:
PipelineElementPipeline 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.
- 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 the wrapped regressor expects; learners do not alter it.
- pass_forward(
- instance: Instance,
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,
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