public class MutableFeatureMap extends FeatureMap
m
Constructor and Description |
---|
MutableFeatureMap()
Creates an empty feature map which converts high cardinality categorical variable infos into reals.
|
MutableFeatureMap(boolean convertHighCardinality)
Creates an empty feature map which can optionally convert high cardinality categorical variable infos into reals.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
double value)
Adds an occurrence of a feature with a given name.
|
void |
clear()
Clears all the feature observations.
|
VariableInfo |
put(VariableInfo info)
Adds a variable info into the feature map.
|
get, iterator, keySet, size, toReadableString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public MutableFeatureMap()
The conversion threshold is CategoricalInfo.THRESHOLD
.
public MutableFeatureMap(boolean convertHighCardinality)
The conversion threshold is CategoricalInfo.THRESHOLD
.
convertHighCardinality
- Should this feature map convert high cardinality categorical variables into real variables?public VariableInfo put(VariableInfo info)
Returns the old one if there was a name collision, otherwise returns null.
info
- The info to add.public void add(String name, double value)
name
- the name of the feature.value
- the observed value of that feature.public void clear()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.