public class OneHotEncoderCommon
extends Object
OneHotEncoder
and OneHotEncoderEstimator
.Constructor and Description |
---|
OneHotEncoderCommon() |
Modifier and Type | Method and Description |
---|---|
static AttributeGroup |
createAttrGroupForAttrNames(String outputColName,
int numAttrs,
boolean dropLast,
boolean keepInvalid)
Creates an `AttributeGroup` with the required number of `BinaryAttribute`.
|
static scala.collection.Seq<AttributeGroup> |
getOutputAttrGroupFromData(Dataset<?> dataset,
scala.collection.Seq<String> inputColNames,
scala.collection.Seq<String> outputColNames,
boolean dropLast)
This method is called when we want to generate
AttributeGroup from actual data for
one-hot encoder. |
static StructField |
transformOutputColumnSchema(StructField inputCol,
String outputColName,
boolean dropLast,
boolean keepInvalid)
Prepares the
StructField with proper metadata for OneHotEncoder 's output column. |
public static StructField transformOutputColumnSchema(StructField inputCol, String outputColName, boolean dropLast, boolean keepInvalid)
StructField
with proper metadata for OneHotEncoder
's output column.inputCol
- (undocumented)outputColName
- (undocumented)dropLast
- (undocumented)keepInvalid
- (undocumented)public static scala.collection.Seq<AttributeGroup> getOutputAttrGroupFromData(Dataset<?> dataset, scala.collection.Seq<String> inputColNames, scala.collection.Seq<String> outputColNames, boolean dropLast)
AttributeGroup
from actual data for
one-hot encoder.dataset
- (undocumented)inputColNames
- (undocumented)outputColNames
- (undocumented)dropLast
- (undocumented)public static AttributeGroup createAttrGroupForAttrNames(String outputColName, int numAttrs, boolean dropLast, boolean keepInvalid)