All Packages Class Hierarchy This Package Previous Next Index
Class jsvm.FeatureSet
java.lang.Object
|
+----jsvm.FeatureSet
- public class FeatureSet
- extends Object
- implements Serializable
A data structure for storing feature/value pairs for an example.
- Version:
- $Id$
- Author:
- Heloise Hse (hwawen@eecs.berkeley.edu)
-
FeatureSet()
-
-
addFeature(long, double)
- Adds a feature/value pair to the set.
-
getIds()
-
-
getValues()
-
-
maxFeatureId()
-
-
numFeatures()
- Gets the number of features in the set
-
toString()
-
FeatureSet
public FeatureSet()
getIds
public long[] getIds()
- Returns:
- An array of feature ID numbers.
getValues
public double[] getValues()
- Returns:
- An array of feature values.
addFeature
public void addFeature(long i,
double val)
- Adds a feature/value pair to the set.
- Parameters:
- i - The feature ID.
- val - The feature value.
numFeatures
public int numFeatures()
- Gets the number of features in the set
- Returns:
- The number of features in the set.
maxFeatureId
public long maxFeatureId()
- Returns:
- The maximum feature ID number in the set.
toString
public String toString()
- Returns:
- The string representation of this feature set contents.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index