|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthhreco.classification.FeatureSet
A data structure for storing features of an example; it is basically a typesafe array of doubles with appropriate accessor methods. It is up to the client to maintain consistency between different instances of feature sets, i.e. that they have the same number of elements and that the features at specific indices are referencing the same feature component.
Constructor Summary | |
FeatureSet(double[] features)
Create a feature vector with the given vector. |
|
FeatureSet(int num)
Create a feature vector of size 'num'. |
Method Summary | |
double |
getFeature(int i)
Return the i'th feature. |
int |
getFeatureCount()
Return the number of features in the vector. |
double[] |
getFeatures()
Return the feature vector. |
void |
setFeature(int i,
double val)
Set the i'th feature to the specified value. |
java.lang.String |
toString()
Text representation of the feature vector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FeatureSet(int num)
public FeatureSet(double[] features)
Method Detail |
public final double getFeature(int i)
public final int getFeatureCount()
public double[] getFeatures()
public final void setFeature(int i, double val)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |