CategoryValueMap<T>

Models & Types · AiDotNet.Preprocessing.Encoders

The fitted encoding of one categorical column: its distinct category values (sorted ascending) and the encoded value of each category.

For Beginners

Category Categories[i] is replaced by Values[i] when the column is transformed. For example a count encoder stores how often each category appeared, and a target encoder stores each category’s (smoothed) target mean.

Constructors

Constructor Summary
CategoryValueMap(Vector<T> categories, Vector<T> values) Creates a map from sorted distinct categories and their encoded values.

Properties

Property Summary
Vector<T> Categories { get; } Gets the distinct category values, sorted ascending.
Vector<T> Values { get; } Gets the encoded value of each category.
int Count { get; } Gets the number of categories.