value_transformation

class ValueOneHotEncoder(ignore_unknown=True)[source]

Bases: object

A simple one-hot encoder, which encodes individual values. A one-hot encoder transforms a categorical input value into an array whose length is the number of categories where all values are zero except one whose value is one, indicating the category that is active.

__init__(ignore_unknown=True)
Parameters

ignore_unknown – whether unknown input values (not seen during fit) shall be ignored, resulting in an array of zeroes; if False, throw an exception instead

fit(values: Sequence[Any])
transform(value) numpy.ndarray