All Packages Class Hierarchy This Package Previous Next Index
Class jsvm.TrainingType
java.lang.Object
|
+----jsvm.TrainingType
- public class TrainingType
- extends Object
- implements Serializable
Data structure for storing a set of training data
consisting of positive and negative examples for
a class.
- Version:
- $Id$
- Author:
- Heloise Hse (hwawen@eecs.berkeley.edu)
-
TrainingType(String)
- Creates a training class instance,
name
.
-
addExample(boolean, FeatureSet)
- Adds an example to this training class.
-
getName()
-
-
maxFeatureId()
-
-
negExamples()
-
-
numExamples()
-
-
numNegExamples()
-
-
numPosExamples()
-
-
posExamples()
-
-
removeAllExamples()
- Removes all of the examples from this training class.
-
setName(String)
- Sets the type of this training class.
-
toString()
-
TrainingType
public TrainingType(String name)
- Creates a training class instance,
name
.
- Parameters:
- name - The name of this training class.
removeAllExamples
public void removeAllExamples()
- Removes all of the examples from this training class.
addExample
public void addExample(boolean lbl,
FeatureSet s)
- Adds an example to this training class.
- Parameters:
- lbl - Indicates positive or negative example.
- s - Example feature set.
posExamples
public Enumeration posExamples()
- Returns:
- An Enumeration of the positve examples in this training class.
negExamples
public Enumeration negExamples()
- Returns:
- An Enumeration of the negative examples in this training class.
getName
public String getName()
- Returns:
- The name of this training class.
setName
public void setName(String s)
- Sets the type of this training class.
numPosExamples
public int numPosExamples()
- Returns:
- The number of positive examples in this training class.
numNegExamples
public int numNegExamples()
- Returns:
- The number of negative examples in this training class.
numExamples
public int numExamples()
- Returns:
- The number of examples in this training class.
maxFeatureId
public long maxFeatureId()
- Returns:
- The maximum feature ID number in this training class.
toString
public String toString()
- Returns:
- The string representation of this training class.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index