edu.cmu.minorthird.classify.multi
Class MultiExample

java.lang.Object
  extended by edu.cmu.minorthird.classify.Example
      extended by edu.cmu.minorthird.classify.multi.MultiExample
All Implemented Interfaces:
HasSubpopulationId, Instance, Visible, java.io.Serializable

public class MultiExample
extends Example

An instance that is associated with a ClassLabel. Implements the Instance interface by delegating to a wrapped Instance, so subclasses just need to attach the right label construct.

Author:
Cameron Williams
See Also:
Serialized Form

Field Summary
protected  MultiClassLabel label
           
 
Fields inherited from class edu.cmu.minorthird.classify.Example
instance, weight
 
Constructor Summary
MultiExample(Instance instance, MultiClassLabel label)
           
MultiExample(Instance instance, MultiClassLabel label, double weight)
           
 
Method Summary
 Example[] getExamples()
          Returns this MultiExample as separate Example's
 ClassLabel getLabel()
          Returns the first label
 MultiClassLabel getMultiLabel()
          get the label associated with the underlying object
 Viewer toGUI()
          Create a viewer
 
Methods inherited from class edu.cmu.minorthird.classify.Example
asInstance, binaryFeatureIterator, featureIterator, getSource, getSubpopulationId, getWeight, getWeight, numericFeatureIterator, numFeatures, setWeight, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

label

protected MultiClassLabel label
Constructor Detail

MultiExample

public MultiExample(Instance instance,
                    MultiClassLabel label,
                    double weight)

MultiExample

public MultiExample(Instance instance,
                    MultiClassLabel label)
Method Detail

getLabel

public ClassLabel getLabel()
Returns the first label

Overrides:
getLabel in class Example

getMultiLabel

public MultiClassLabel getMultiLabel()
get the label associated with the underlying object


getExamples

public Example[] getExamples()
Returns this MultiExample as separate Example's


toGUI

public Viewer toGUI()
Create a viewer

Specified by:
toGUI in interface Visible
Overrides:
toGUI in class Example