OneHotEncoder class
OneHotEncoder encodes categorical values into binary vectors. It is commonly used in machine learning preprocessing. Inspired by scikit-learn's OneHotEncoder.
Constructors
-
OneHotEncoder.new({bool handleUnknown = false, List<
int> ? unknownVector})
Properties
- categories → List
-
no setter
- handleUnknown → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFitted → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
unknownVector
→ List<
int> -
final
Methods
-
fit(
List values) → void -
inverseTransform(
List< List< encodedVectors) → Listint> > -
loadFromModel(
EncoderModel model) → void - Loads encoder configuration from an EncoderModel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toModel(
) → EncoderModel - Serializes the encoder to an EncoderModel object.
-
toString(
) → String -
A string representation of this object.
inherited
-
transform(
List values) → List< List< int> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited