FrequencyEncoder

This transformer is deprecated. Consider using the UniformEncoder instead.

Compatibility: categorical data

The FrequencyEncoder transforms data that represents unordered, categorical values into decimals in the range [0, 1]. This range is broken up into separate intervals for each category -- more popular categories take up larger intervals.

from rdt.transformers.categorical import FrequencyEncoder
fre = FrequencyEncoder()

Parameters

add_noise: Add noise when transforming a category into the [0, 1] interval.

(default) False

Do not add noise. Each time a category appears, it will always be transformed to the same value.

True

Add noise. A category may be transformed to different values every time it appears (but it will always stay within the interval).

Last updated