Package ciir.umass.edu.learning
Class DenseDataPoint
- java.lang.Object
-
- ciir.umass.edu.learning.DataPoint
-
- ciir.umass.edu.learning.DenseDataPoint
-
public class DenseDataPoint extends DataPoint
-
-
Field Summary
-
Fields inherited from class ciir.umass.edu.learning.DataPoint
cached, description, FEATURE_INCREASE, fVals, id, knownFeatures, label, MAX_FEATURE, missingZero, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DenseDataPoint(DenseDataPoint dp)DenseDataPoint(java.lang.String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetFeatureValue(int fid)Get the value of the feature with the given feature IDfloat[]getFeatureVector()Gets the value of all features as a dense array of feature values.voidsetFeatureValue(int fid, float fval)Set the value of the feature with the given feature IDvoidsetFeatureVector(float[] dfVals)Sets the value of all features with the provided dense array of feature values-
Methods inherited from class ciir.umass.edu.learning.DataPoint
getCached, getDescription, getID, getKey, getLabel, getNumberOfKnownFeatures, getValue, isUnknown, parse, resetCached, setCached, setDescription, setID, setLabel, toString
-
-
-
-
Constructor Detail
-
DenseDataPoint
public DenseDataPoint(java.lang.String text)
-
DenseDataPoint
public DenseDataPoint(DenseDataPoint dp)
-
-
Method Detail
-
getFeatureValue
public float getFeatureValue(int fid)
Description copied from class:DataPointGet the value of the feature with the given feature ID- Specified by:
getFeatureValuein classDataPoint- Returns:
-
setFeatureValue
public void setFeatureValue(int fid, float fval)Description copied from class:DataPointSet the value of the feature with the given feature ID- Specified by:
setFeatureValuein classDataPoint
-
setFeatureVector
public void setFeatureVector(float[] dfVals)
Description copied from class:DataPointSets the value of all features with the provided dense array of feature values- Specified by:
setFeatureVectorin classDataPoint
-
getFeatureVector
public float[] getFeatureVector()
Description copied from class:DataPointGets the value of all features as a dense array of feature values.- Specified by:
getFeatureVectorin classDataPoint
-
-