K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.public class StringEncoderPreprocessor<K,V> extends EncoderPreprocessor<K,V>
This preprocessor can transform multiple columns which indices are handled during training process. These indexes could be defined via .withEncodedFeature(featureIndex) call.
NOTE: it doesn?t add new column but change data in-place.
There is only a one strategy regarding how StringEncoder will handle unseen labels when you have fit a StringEncoder on one dataset and then use it to transform another: put unseen labels in a special additional bucket, at index is equal amountOfCategories.
Modifier and Type | Field and Description |
---|---|
protected static long |
serialVersionUID |
basePreprocessor, encodingValues, handledIndices, KEY_FOR_NULL_VALUES
Constructor and Description |
---|
StringEncoderPreprocessor(Map<String,Integer>[] encodingValues,
IgniteBiFunction<K,V,Object[]> basePreprocessor,
Set<Integer> handledIndices)
Constructs a new instance of String Encoder preprocessor.
|
Modifier and Type | Method and Description |
---|---|
Vector |
apply(K k,
V v)
Applies this preprocessor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
andThen
protected static final long serialVersionUID
public StringEncoderPreprocessor(Map<String,Integer>[] encodingValues, IgniteBiFunction<K,V,Object[]> basePreprocessor, Set<Integer> handledIndices)
basePreprocessor
- Base preprocessor.handledIndices
- Handled indices.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019