edu.cmu.minorthird.classify
Class OneVsAllClassifier

java.lang.Object
  extended by edu.cmu.minorthird.classify.OneVsAllClassifier
All Implemented Interfaces:
Classifier, Visible, java.io.Serializable
Direct Known Subclasses:
SequenceUtils.MultiClassClassifier

public class OneVsAllClassifier
extends java.lang.Object
implements Classifier, Visible, java.io.Serializable

A Classifier composed of a bunch of binary classifiers, each of which separates one class from the others.

Author:
William Cohen
See Also:
Serialized Form

Constructor Summary
OneVsAllClassifier(java.lang.String[] classNames, Classifier[] binaryClassifiers)
          Create a OneVsAllClassifier.
 
Method Summary
 ClassLabel classification(Instance instance)
          Return a predicted type for the span, as a class label.
 java.lang.String explain(Instance instance)
          Return some string that 'explains' the classification
 Classifier[] getBinaryClassifiers()
           
 java.lang.String[] getClassNames()
           
 Explanation getExplanation(Instance instance)
          Return an Explanation for the classification
 Viewer toGUI()
          Create a view of this object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneVsAllClassifier

public OneVsAllClassifier(java.lang.String[] classNames,
                          Classifier[] binaryClassifiers)
Create a OneVsAllClassifier.

Method Detail

getBinaryClassifiers

public Classifier[] getBinaryClassifiers()

classification

public ClassLabel classification(Instance instance)
Description copied from interface: Classifier
Return a predicted type for the span, as a class label.

Specified by:
classification in interface Classifier

explain

public java.lang.String explain(Instance instance)
Description copied from interface: Classifier
Return some string that 'explains' the classification

Specified by:
explain in interface Classifier

getExplanation

public Explanation getExplanation(Instance instance)
Description copied from interface: Classifier
Return an Explanation for the classification

Specified by:
getExplanation in interface Classifier

getClassNames

public java.lang.String[] getClassNames()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toGUI

public Viewer toGUI()
Description copied from interface: Visible
Create a view of this object

Specified by:
toGUI in interface Visible