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)

Constructor Index

 o TrainingType(String)
Creates a training class instance, name.

Method Index

 o addExample(boolean, FeatureSet)
Adds an example to this training class.
 o getName()
 o maxFeatureId()
 o negExamples()
 o numExamples()
 o numNegExamples()
 o numPosExamples()
 o posExamples()
 o removeAllExamples()
Removes all of the examples from this training class.
 o setName(String)
Sets the type of this training class.
 o toString()

Constructors

 o TrainingType
public TrainingType(String name)
Creates a training class instance, name.

Parameters:
name - The name of this training class.

Methods

 o removeAllExamples
public void removeAllExamples()
Removes all of the examples from this training class.

 o 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.
 o posExamples
public Enumeration posExamples()
Returns:
An Enumeration of the positve examples in this training class.
 o negExamples
public Enumeration negExamples()
Returns:
An Enumeration of the negative examples in this training class.
 o getName
public String getName()
Returns:
The name of this training class.
 o setName
public void setName(String s)
Sets the type of this training class.

 o numPosExamples
public int numPosExamples()
Returns:
The number of positive examples in this training class.
 o numNegExamples
public int numNegExamples()
Returns:
The number of negative examples in this training class.
 o numExamples
public int numExamples()
Returns:
The number of examples in this training class.
 o maxFeatureId
public long maxFeatureId()
Returns:
The maximum feature ID number in this training class.
 o 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