# `Transformer`

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

Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC)

#### get_input_schema() → [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/transformer.py#L29)

Return the schema of instances *entering* this transformer.

Defaults to [`get_schema()`](#capymoa.stream.preprocessing.Transformer.get_schema) for transformers that do not alter the
attribute set.

#### *abstract* get_schema() → [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/transformer.py#L19)

Return the schema of instances *leaving* this transformer.

This is the schema the next element in a pipeline will receive, which
is not necessarily the schema this transformer consumes – a filter may
add, drop or rewrite attributes. See [`get_input_schema()`](#capymoa.stream.preprocessing.Transformer.get_input_schema).

#### *abstract* restart()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/transformer.py#L37)

#### *abstract* transform_instance(instance) → [Instance](capymoa.core.Instance.md#capymoa.core.Instance)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/stream/preprocessing/transformer.py#L15)
