public class EnumEncoder extends java.lang.Object implements CategoricalEncoder
Constructor and Description |
---|
EnumEncoder(java.lang.String columnName,
int targetIndex,
java.lang.String[] domainValues) |
Modifier and Type | Method and Description |
---|---|
boolean |
encodeCatValue(java.lang.String levelName,
double[] rawData)
Encodes a given categorical level into a raw array onto the right position.
|
void |
encodeNA(double[] rawData)
Encode NA (missing level) into raw data.
|
public EnumEncoder(java.lang.String columnName, int targetIndex, java.lang.String[] domainValues)
public boolean encodeCatValue(java.lang.String levelName, double[] rawData)
CategoricalEncoder
encodeCatValue
in interface CategoricalEncoder
levelName
- categorical levelrawData
- raw input to score0public void encodeNA(double[] rawData)
CategoricalEncoder
encodeNA
in interface CategoricalEncoder
rawData
- target raw data array