ClassifierPipelineElement#
- class capymoa.stream.preprocessing.ClassifierPipelineElement[source]#
Bases:
PipelineElement
Pipeline element that wraps around a classifier
- __init__(learner: Classifier)[source]#
Initializes the pipeline element with a classifier.
Parameters#
- learner: Classifier
The classifier associated with this pipeline element.
- 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: Any = 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 classifier