Encoder class abstract

Categorical data encoder factory.

Algorithms that process data to create prediction models can't handle categorical data, since they are based on mathematical equations and work only with bare numbers. That means that the categorical data should be converted to numbers.

The factory exposes different ways to convert categorical data into numbers.

Constructors

Encoder.label(DataFrame fittingData, {Iterable<int>? columnIndices, Iterable<String>? columnNames, UnknownValueHandlingType unknownValueHandlingType = defaultUnknownValueHandlingType})
Gets columns by columnIndices or columnNames (columnIndices has a precedence over columnNames) from fittingData, collects all unique values from the columns and builds a map raw value => encoded value. Once one calls the process method, the mapping will be applied.
factory
Encoder.oneHot(DataFrame fittingData, {Iterable<int>? columnIndices, Iterable<String>? columnNames, UnknownValueHandlingType unknownValueHandlingType = defaultUnknownValueHandlingType})
Gets columns by columnIndices or columnNames (columnIndices has a precedence over columnNames) from fittingData, collects all unique values from the columns and builds a map raw value => encoded value. Once one calls the process method, the mapping will be applied.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(DataFrame input) → DataFrame
inherited
toString() String
A string representation of this object.
inherited

Operators

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