# `ClassifierPipelineElement`

### *class* capymoa.stream.preprocessing.ClassifierPipelineElement[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L61)

Bases: [`PipelineElement`](capymoa.stream.preprocessing.PipelineElement.md#capymoa.stream.preprocessing.PipelineElement)

Pipeline element that wraps around a classifier

#### \_\_init_\_(learner: [Classifier](capymoa.base.Classifier.md#capymoa.base.Classifier))[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L66)

Initializes the pipeline element with a classifier.

## Parameters

learner: Classifier
: The classifier associated with this pipeline element.

#### get_input_schema() → [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema) | [None](https://docs.python.org/3/builtins/constants.html#None)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L48)

Return the schema of instances this element expects to receive.

Defaults to [`get_schema()`](#capymoa.stream.preprocessing.ClassifierPipelineElement.get_schema), which is correct for every element that
does not alter the attribute set.

#### get_schema() → [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema) | [None](https://docs.python.org/3/builtins/constants.html#None)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L120)

Return the schema the wrapped classifier expects; learners do not alter it.

#### pass_forward(instance: [Instance](capymoa.core.Instance.md#capymoa.core.Instance)) → [Instance](capymoa.core.Instance.md#capymoa.core.Instance)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L79)

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](capymoa.core.Instance.md#capymoa.core.Instance), prediction: [Any](https://docs.python.org/3/library/typing.html#typing.Any) = None) → [tuple](https://docs.python.org/3/builtins/stdtypes.html#tuple)[[Instance](capymoa.core.Instance.md#capymoa.core.Instance), [Any](https://docs.python.org/3/library/typing.html#typing.Any)][[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/pipeline.py#L98)

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
