# `TransformerPipelineElement`

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

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

Pipeline element that wraps around a transformer

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

Initializes the pipeline element with a transformer.

## Parameters

transformer: Transformer
: The transformer 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#L257)

Return the schema the wrapped transformer expects to receive.

#### 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#L253)

Return the schema of instances leaving the wrapped transformer.

#### 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#L213)

Transforms and returns the provided instance.

## Parameters

instance: Instance
: The input instance

## Returns

instance: Instance
: The transformed instance

#### 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#L231)

Transforms and returns the provided instance. Also returns the prediction that was provided.

## Parameters

instance: Instance
: The input instance

prediction: Any
: Most likely None, but could be anything.

## Returns

Tuple[Instance, Any]
: The transformed instance and the prediction that was provided
