|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.vectorizer.encoders.FeatureVectorEncoder
org.apache.mahout.vectorizer.encoders.InteractionValueEncoder
public class InteractionValueEncoder
Field Summary |
---|
Fields inherited from class org.apache.mahout.vectorizer.encoders.FeatureVectorEncoder |
---|
CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED |
Constructor Summary | |
---|---|
InteractionValueEncoder(String name,
FeatureVectorEncoder encoderOne,
FeatureVectorEncoder encoderTwo)
|
Method Summary | |
---|---|
void |
addInteractionToVector(byte[] originalForm1,
byte[] originalForm2,
double weight,
Vector data)
Adds a value to a vector. |
void |
addInteractionToVector(String original1,
String original2,
double weight,
Vector data)
Adds a value to a vector. |
void |
addToVector(byte[] originalForm,
double w,
Vector data)
Adds a value to a vector. |
void |
addToVector(String 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[] originalForm1,
byte[] originalForm2,
double w)
|
protected int |
hashForProbe(byte[] originalForm,
int dataSize,
String name,
int probe)
Provides the unique hash for a particular probe. |
Methods inherited from class org.apache.mahout.vectorizer.encoders.FeatureVectorEncoder |
---|
addToVector, addToVector, bytesForString, getName, getProbes, getWeight, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setProbes, setTraceDictionary, trace, trace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InteractionValueEncoder(String name, FeatureVectorEncoder encoderOne, FeatureVectorEncoder encoderTwo)
Method Detail |
---|
public void addToVector(String originalForm, double w, Vector data)
addToVector
in class FeatureVectorEncoder
originalForm
- The original form of the first value as a string.data
- The vector to which the value should be added.w
- The weight to be applied to this feature.public void addToVector(byte[] originalForm, double w, Vector data)
addToVector
in class FeatureVectorEncoder
originalForm
- The original form of the first value as a byte array.data
- The vector to which the value should be added.public void addInteractionToVector(String original1, String original2, double weight, Vector data)
original1
- The original form of the first value as a string.original2
- The original form of the second value as a string.weight
- How much to weight this interactiondata
- The vector to which the value should be added.public void addInteractionToVector(byte[] originalForm1, byte[] originalForm2, double weight, Vector data)
originalForm1
- The original form of the first value as a byte array.originalForm2
- The original form of the second value as a byte array.weight
- How much to weight this interactiondata
- The vector to which the value should be added.protected double getWeight(byte[] originalForm1, byte[] originalForm2, double w)
public String asString(String originalForm)
asString
in class FeatureVectorEncoder
originalForm
- The original form of the value as a string.
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 number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |