cc.mallet.types
Class RankedFeatureVector
- java.lang.Object
-
- cc.mallet.types.SparseVector
-
- cc.mallet.types.FeatureVector
-
- cc.mallet.types.RankedFeatureVector
-
- All Implemented Interfaces:
- AlphabetCarrying, ConstantMatrix, Vector, java.io.Serializable
- Direct Known Subclasses:
- BiNormalSeparation, ExpGain, FeatureCounts, GainRatio, GradientGain, InfoGain, KLGain, LabelVector, PartiallyRankedFeatureVector
public class RankedFeatureVector extends FeatureVector
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceRankedFeatureVector.Factorystatic interfaceRankedFeatureVector.PerLabelFactory
-
Constructor Summary
Constructors Constructor and Description RankedFeatureVector(Alphabet dict, AugmentableFeatureVector v)RankedFeatureVector(Alphabet dict, DenseVector v)RankedFeatureVector(Alphabet dict, double[] values)RankedFeatureVector(Alphabet dict, double[] values, int begin, int length)RankedFeatureVector(Alphabet dict, int[] indices, double[] values)RankedFeatureVector(Alphabet dict, SparseVector v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetIndexAtRank(int rank)doublegetMaxValue()intgetMaxValuedIndex()intgetMaxValuedIndexIn(FeatureSelection fs)java.lang.ObjectgetMaxValuedObject()java.lang.ObjectgetMaxValuedObjectIn(FeatureSelection fs)doublegetMaxValueIn(FeatureSelection fs)java.lang.ObjectgetObjectAtRank(int rank)intgetRank(int index)intgetRank(java.lang.Object o)doublegetValueAtRank(int rank)voidprintByRank(java.io.OutputStream out)Prints a human-readable version of this vector, with features listed in ranked order.voidprintByRank(java.io.PrintWriter out)Prints a human-readable version of this vector, with features listed in ranked order.voidprintLowerK(java.io.PrintWriter out, int num)voidprintTopK(java.io.PrintWriter out, int num)voidset(int i, double v)-
Methods inherited from class cc.mallet.types.FeatureVector
alphabetsMatch, cloneMatrix, cloneMatrixZeroed, contains, getAlphabet, getAlphabets, getObjectIndices, location, newFeatureVector, toSimpFile, toString, toString, value
-
Methods inherited from class cc.mallet.types.SparseVector
absNorm, addTo, addTo, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, indexAtLocation, infinityNorm, isBinary, isInfinite, isNaN, isNaNOrInfinite, location, makeBinary, makeNonBinary, map, numLocations, oneNorm, plusEqualsSparse, plusEqualsSparse, print, setAll, setValue, setValueAtLocation, singleIndex, singleSize, singleToIndices, singleValue, timesEquals, timesEqualsSparse, timesEqualsSparse, timesEqualsSparseZero, twoNorm, value, value, valueAtLocation, vectorAdd
-
-
-
-
Constructor Detail
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, int[] indices, double[] values)
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, double[] values)
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, double[] values, int begin, int length)
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, DenseVector v)
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, AugmentableFeatureVector v)
-
RankedFeatureVector
public RankedFeatureVector(Alphabet dict, SparseVector v)
-
-
Method Detail
-
getMaxValuedIndex
public int getMaxValuedIndex()
-
getMaxValuedObject
public java.lang.Object getMaxValuedObject()
-
getMaxValuedIndexIn
public int getMaxValuedIndexIn(FeatureSelection fs)
-
getMaxValuedObjectIn
public java.lang.Object getMaxValuedObjectIn(FeatureSelection fs)
-
getMaxValue
public double getMaxValue()
-
getMaxValueIn
public double getMaxValueIn(FeatureSelection fs)
-
getIndexAtRank
public int getIndexAtRank(int rank)
-
getObjectAtRank
public java.lang.Object getObjectAtRank(int rank)
-
getValueAtRank
public double getValueAtRank(int rank)
-
printByRank
public void printByRank(java.io.OutputStream out)
Prints a human-readable version of this vector, with features listed in ranked order.- Parameters:
out- Stream to write to
-
printByRank
public void printByRank(java.io.PrintWriter out)
Prints a human-readable version of this vector, with features listed in ranked order.- Parameters:
out- Writer to write to
-
printTopK
public void printTopK(java.io.PrintWriter out, int num)
-
printLowerK
public void printLowerK(java.io.PrintWriter out, int num)
-
getRank
public int getRank(java.lang.Object o)
-
getRank
public int getRank(int index)
-
set
public void set(int i, double v)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG