All Packages Class Hierarchy This Package Previous Next Index
Class jsvm.TrainingSet
java.lang.Object
|
+----jsvm.TrainingSet
- public class TrainingSet
- extends Object
- implements Serializable
Data structure for storing multiple sets of training data. Each set
contains the data for a class.
- Version:
- $Id$
- Author:
- Heloise Hse (hwawen@eecs.berkeley.edu)
-
TrainingSet()
- Class constructor.
-
addExample(String, boolean, FeatureSet)
- Adds an example to the class,
type
.
-
addType(TrainingType)
- Adds a set of training data for a particular class.
-
getType(String)
-
-
numTypes()
-
-
removeType(String)
- Removes the set of training data for class
s
.
-
toString()
-
-
types()
-
TrainingSet
public TrainingSet()
- Class constructor.
addType
public void addType(TrainingType te)
- Adds a set of training data for a particular class.
- Parameters:
- The - training data to be added.
removeType
public void removeType(String s)
- Removes the set of training data for class
s
.
- Parameters:
- The - name of the class to be removed.
getType
public TrainingType getType(String s)
- Returns:
- The set of training data for class
s
.
types
public Enumeration types()
- Returns:
- An enumeration of training data sets.
numTypes
public int numTypes()
- Returns:
- Number of training data sets.
addExample
public void addExample(String type,
boolean lbl,
FeatureSet s)
- Adds an example to the class,
type
.
- Parameters:
- type - Name of the class that this example belongs to.
- lbl - Indicate positive or negative examples.
- s - Example feature set.
toString
public String toString()
- Returns:
- A string representation of contents in the training set.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index