|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.pipe.Pipe
cc.mallet.pipe.Array2FeatureVector
public class Array2FeatureVector
Converts a Java array of numerical types to a FeatureVector, where the Alphabet is the data array index wrapped in an Integer object.
| Constructor Summary | |
|---|---|
Array2FeatureVector()
|
|
Array2FeatureVector(Alphabet dataAlphabet,
Alphabet targetAlphabet)
Construct a pipe based on the dimensions of the data and target. |
|
Array2FeatureVector(int capacity)
|
|
| Method Summary | |
|---|---|
Instance |
pipe(Instance carrier)
Convert the data in an Instance from an array to a
FeatureVector leaving other fields unchanged. |
int |
size()
Current size of the Vocabulary |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Array2FeatureVector(int capacity)
public Array2FeatureVector()
public Array2FeatureVector(Alphabet dataAlphabet,
Alphabet targetAlphabet)
| Method Detail |
|---|
public Instance pipe(Instance carrier)
throws java.lang.IllegalStateException
Instance from an array to a
FeatureVector leaving other fields unchanged.
Instance.getData() must return a numeric array, and it is
cast to double[]
pipe in class Pipejava.lang.IllegalStateException - If Instance.getTarget() is
not a Labelingpublic int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||