public class StaticWordValueEncoder extends WordValueEncoder
CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED
Constructor and Description |
---|
StaticWordValueEncoder(String name) |
Modifier and Type | Method and Description |
---|---|
protected int |
hashForProbe(byte[] originalForm,
int dataSize,
String name,
int probe)
Provides the unique hash for a particular probe.
|
void |
setDictionary(Map<String,Double> dictionary)
Sets the weighting dictionary to be used by this encoder.
|
void |
setMissingValueWeight(double missingValueWeight)
Sets the weight that is to be used for values that do not appear in the dictionary.
|
protected double |
weight(byte[] originalForm) |
addToVector, asString, getWeight
addToVector, addToVector, addToVector, bytesForString, getName, getProbes, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setProbes, setTraceDictionary, trace, trace
public StaticWordValueEncoder(String name)
protected int hashForProbe(byte[] originalForm, int dataSize, String name, int probe)
FeatureVectorEncoder
hashForProbe
in class WordValueEncoder
originalForm
- The original byte array valuedataSize
- The length of the vector being encodedname
- The name of the variable being encodedprobe
- The probe numberpublic void setDictionary(Map<String,Double> dictionary)
dictionary
- The dictionary to use to look up weights.public void setMissingValueWeight(double missingValueWeight)
missingValueWeight
- The default weight for missing values.protected double weight(byte[] originalForm)
weight
in class WordValueEncoder
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.