public abstract class WordValueEncoder extends FeatureVectorEncoder
CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED| Modifier | Constructor and Description |
|---|---|
protected |
WordValueEncoder(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToVector(byte[] originalForm,
double w,
Vector data)
Adds a value to a vector.
|
String |
asString(String originalForm)
Converts a value into a form that would help a human understand the internals of how the value
is being interpreted.
|
protected double |
getWeight(byte[] originalForm,
double w) |
protected int |
hashForProbe(byte[] originalForm,
int dataSize,
String name,
int probe)
Provides the unique hash for a particular probe.
|
protected abstract double |
weight(byte[] originalForm) |
addToVector, addToVector, addToVector, bytesForString, getName, getProbes, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setProbes, setTraceDictionary, trace, traceprotected WordValueEncoder(String name)
public void addToVector(byte[] originalForm,
double w,
Vector data)
addToVector in class FeatureVectorEncoderoriginalForm - The original form of the value as a string.data - The vector to which the value should be added.protected double getWeight(byte[] originalForm,
double w)
getWeight in class FeatureVectorEncoderprotected int hashForProbe(byte[] originalForm,
int dataSize,
String name,
int probe)
FeatureVectorEncoderhashForProbe in class FeatureVectorEncoderoriginalForm - The original byte array valuedataSize - The length of the vector being encodedname - The name of the variable being encodedprobe - The probe numberpublic String asString(String originalForm)
asString in class FeatureVectorEncoderoriginalForm - The original form of the value as a string.protected abstract double weight(byte[] originalForm)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.