UnknownValueHandlingType enum

A way to handle unknown categorical data

During processing new data one can encounter previously unseen value. Let's say, one has a list of values denoting a level of education:

['BSc', 'BSc', 'PhD', 'High School', 'PhD']

One successfully applied some EncoderType to the data, let's say, EncoderType.label.

But what should one do if there is an unknown categorical value, e.g. 'School SAT', among new data to process through the same Pipeline?

UnknownValueHandlingType.error forces the pipeline to stop preprocessing and throw an error

UnknownValueHandlingType.ignore makes it possible to continue the preprocessing as nothing happened - in this case depending on the EncoderType will be used an autogenerated encoded value



error → const UnknownValueHandlingType
ignore → const UnknownValueHandlingType


hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


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


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


values → const List<UnknownValueHandlingType>
A constant List of the values in this enum, in order of their declaration.