public class OneHotEncoder extends java.lang.Object implements CategoricalEncoder
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.
|
java.lang.String |
toString() |
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 arraypublic java.lang.String toString()
toString
in class java.lang.Object