public abstract class CachingValueEncoder extends FeatureVectorEncoder
CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED
Modifier | Constructor and Description |
---|---|
protected |
CachingValueEncoder(String name,
int seed) |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
getSeed() |
protected int |
hashForProbe(byte[] originalForm,
int dataSize,
String name,
int probe)
Provides the unique hash for a particular probe.
|
void |
setProbes(int probes)
Sets the number of locations in the feature vector that a value should be in.
|
addToVector, addToVector, addToVector, addToVector, asString, bytesForString, getName, getProbes, getWeight, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setTraceDictionary, trace, trace
protected CachingValueEncoder(String name, int seed)
public void setProbes(int probes)
setProbes
in class FeatureVectorEncoder
probes
- Number of locations to increment.protected abstract int getSeed()
protected int hashForProbe(byte[] originalForm, int dataSize, String name, int probe)
FeatureVectorEncoder
hashForProbe
in class FeatureVectorEncoder
originalForm
- The original byte array valuedataSize
- The length of the vector being encodedname
- The name of the variable being encodedprobe
- The probe numberCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.