encodeAsOneHotLabels function
PipeableOperatorFn
encodeAsOneHotLabels({})
A factory function to use one hot
categorical data encoder in pipeline
Implementation
PipeableOperatorFn encodeAsOneHotLabels({
Iterable<int>? features,
Iterable<String>? featureNames,
String headerPrefix = '',
String headerPostfix = '',
UnknownValueHandlingType unknownValueHandlingType =
defaultUnknownValueHandlingType,
}) => (data, {dtype}) => EncoderImpl(
data,
EncoderType.oneHot,
const SeriesEncoderFactoryImpl(),
featureIds: features,
featureNames: featureNames,
encodedHeaderPostfix: headerPostfix,
encodedHeaderPrefix: headerPrefix,
unknownValueHandlingType: unknownValueHandlingType,
);