edu.umass.cs.mallet.base.types
Class LabelVector
java.lang.Object
edu.umass.cs.mallet.base.types.SparseVector
edu.umass.cs.mallet.base.types.FeatureVector
edu.umass.cs.mallet.base.types.RankedFeatureVector
edu.umass.cs.mallet.base.types.LabelVector
- All Implemented Interfaces:
- ConstantMatrix, Labeling, java.io.Serializable, Vector
- public class LabelVector
- extends RankedFeatureVector
- implements Labeling
- See Also:
- Serialized Form
Methods inherited from class edu.umass.cs.mallet.base.types.RankedFeatureVector |
getIndexAtRank, getMaxValue, getMaxValuedIndex, getMaxValuedIndexIn, getMaxValuedObject, getMaxValuedObjectIn, getMaxValueIn, getObjectAtRank, getRank, printByRank, printByRank, set, setRankOrder, setRankOrder, setRankOrder |
Methods inherited from class edu.umass.cs.mallet.base.types.SparseVector |
absNorm, addTo, addTo, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, indexAtLocation, infinityNorm, isBinary, isNaN, location, makeBinary, makeNonBinary, map, numLocations, oneNorm, plusEqualsSparse, plusEqualsSparse, print, removeDuplicates, setAll, setValue, setValueAtLocation, singleIndex, singleSize, singleToIndices, singleValue, sortIndices, timesEquals, timesEqualsSparse, timesEqualsSparse, twoNorm, value, value, valueAtLocation, vectorAdd |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LabelVector
public LabelVector(LabelAlphabet dict,
int[] features,
double[] values)
LabelVector
public LabelVector(Label[] labels,
double[] values)
LabelVector
public LabelVector(LabelAlphabet dict,
double[] values)
labelAtLocation
public final Label labelAtLocation(int loc)
- Specified by:
labelAtLocation
in interface Labeling
getLabelAlphabet
public LabelAlphabet getLabelAlphabet()
- Specified by:
getLabelAlphabet
in interface Labeling
getBestIndex
public int getBestIndex()
- Specified by:
getBestIndex
in interface Labeling
getBestLabel
public Label getBestLabel()
- Specified by:
getBestLabel
in interface Labeling
getBestValue
public double getBestValue()
- Specified by:
getBestValue
in interface Labeling
value
public double value(Label label)
- Specified by:
value
in interface Labeling
getRank
public int getRank(Label label)
- Specified by:
getRank
in interface Labeling
getRank
public int getRank(int labelIndex)
- Specified by:
getRank
in interface Labeling
- Overrides:
getRank
in class RankedFeatureVector
getLabelAtRank
public Label getLabelAtRank(int rank)
- Specified by:
getLabelAtRank
in interface Labeling
getValueAtRank
public double getValueAtRank(int rank)
- Specified by:
getValueAtRank
in interface Labeling
- Overrides:
getValueAtRank
in class RankedFeatureVector
toLabelVector
public LabelVector toLabelVector()
- Specified by:
toLabelVector
in interface Labeling