cc.mallet.pipe
Class Array2FeatureVector
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.Array2FeatureVector
-
- All Implemented Interfaces:
- AlphabetCarrying, java.io.Serializable
public class Array2FeatureVector extends Pipe
Converts a Java array of numerical types to a FeatureVector, where the Alphabet is the data array index wrapped in an Integer object.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Array2FeatureVector()Array2FeatureVector(Alphabet dataAlphabet, Alphabet targetAlphabet)Construct a pipe based on the dimensions of the data and target.Array2FeatureVector(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Instancepipe(Instance carrier)Convert the data in anInstancefrom an array to aFeatureVectorleaving other fields unchanged.intsize()Current size of the Vocabulary-
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, newIteratorFrom, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
-
-
-
-
Constructor Detail
-
Array2FeatureVector
public Array2FeatureVector(int capacity)
-
Array2FeatureVector
public Array2FeatureVector()
-
-
Method Detail
-
pipe
public Instance pipe(Instance carrier) throws java.lang.IllegalStateException
Convert the data in anInstancefrom an array to aFeatureVectorleaving other fields unchanged.Instance.getData()must return a numeric array, and it is cast todouble[]
-
size
public int size()
Current size of the Vocabulary
-
-
DataMelt 3.0 © DataMelt by jWork.ORG