edu.cmu.minorthird.classify.multi
Class MultiExample
java.lang.Object
edu.cmu.minorthird.classify.Example
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
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 |
label
protected MultiClassLabel label
MultiExample
public MultiExample(Instance instance,
MultiClassLabel label,
double weight)
MultiExample
public MultiExample(Instance instance,
MultiClassLabel label)
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