LabelEncoder class

LabelEncoder encodes categorical values into integer labels and allows inverse transformation back to original values. Inspired by scikit-learn's LabelEncoder.

Constructors

LabelEncoder.new({bool handleUnknown = false, int unknownValue = -1})

Properties

handleUnknown bool
final
hashCode int
The hash code for this object.
no setterinherited
inverseLabelMap Map<int, dynamic>
no setter
isFitted bool
no setter
labelMap Map<dynamic, int>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unknownValue int
final

Methods

fit(List values) → void
inverseTransform(List<int> labels) List
loadFromModel(EncoderModel model) → void
Reconstructs the encoder from an EncoderModel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toModel() EncoderModel
Serializes the current encoder to an EncoderModel object.
toString() String
A string representation of this object.
inherited
transform(List values) List<int>

Operators

operator ==(Object other) bool
The equality operator.
inherited