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)

Constructor Index

 o TrainingSet()
Class constructor.

Method Index

 o addExample(String, boolean, FeatureSet)
Adds an example to the class, type.
 o addType(TrainingType)
Adds a set of training data for a particular class.
 o getType(String)
 o numTypes()
 o removeType(String)
Removes the set of training data for class s.
 o toString()
 o types()

Constructors

 o TrainingSet
public TrainingSet()
Class constructor.

Methods

 o addType
public void addType(TrainingType te)
Adds a set of training data for a particular class.

Parameters:
The - training data to be added.
 o removeType
public void removeType(String s)
Removes the set of training data for class s.

Parameters:
The - name of the class to be removed.
 o getType
public TrainingType getType(String s)
Returns:
The set of training data for class s.
 o types
public Enumeration types()
Returns:
An enumeration of training data sets.
 o numTypes
public int numTypes()
Returns:
Number of training data sets.
 o 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.
 o 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