edu.cmu.minorthird.classify.sequential
Class TrivialSequenceClassifier

java.lang.Object
  extended by edu.cmu.minorthird.classify.sequential.TrivialSequenceClassifier
All Implemented Interfaces:
SequenceClassifier, SequenceConstants

public class TrivialSequenceClassifier
extends java.lang.Object
implements SequenceClassifier, SequenceConstants

Apply a classifier to each item in a sequence in turn, using as history the previous predicted items.

Author:
William Cohen

Field Summary
 
Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants
HISTORY_FEATURE, NULL_CLASS_NAME
 
Constructor Summary
TrivialSequenceClassifier(Classifier classifier, int historySize)
           
 
Method Summary
 ClassLabel[] classification(Instance[] sequence)
          Return a predicted type for each element of the sequence.
 java.lang.String explain(Instance[] sequence)
          Return some string that 'explains' the classification
 Explanation getExplanation(Instance[] sequence)
          Return and explanation for a classification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrivialSequenceClassifier

public TrivialSequenceClassifier(Classifier classifier,
                                 int historySize)
Method Detail

classification

public ClassLabel[] classification(Instance[] sequence)
Description copied from interface: SequenceClassifier
Return a predicted type for each element of the sequence.

Specified by:
classification in interface SequenceClassifier

explain

public java.lang.String explain(Instance[] sequence)
Description copied from interface: SequenceClassifier
Return some string that 'explains' the classification

Specified by:
explain in interface SequenceClassifier

getExplanation

public Explanation getExplanation(Instance[] sequence)
Description copied from interface: SequenceClassifier
Return and explanation for a classification

Specified by:
getExplanation in interface SequenceClassifier