|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.sequential.CMM
public class CMM
A conditional markov model classifier.
Field Summary |
---|
Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants |
---|
HISTORY_FEATURE, NULL_CLASS_NAME |
Constructor Summary | |
---|---|
CMM(Classifier classifier,
int historySize,
ExampleSchema schema)
|
Method Summary | |
---|---|
ClassLabel[] |
classification(Instance[] sequence)
Return a predicted type for each element of the sequence. |
double |
confidence(Instance[] sequence,
ClassLabel[] predictedClasses,
ClassLabel[] alternateClasses,
int lo,
int hi)
Return a measure of confidence that the correct ClassLabels for indices lo...hi-1 of the 'sequence' are in fact the ones in 'predictedClasses[lo..hi-1]', rather than the ones given in in 'alternateClasses'. |
java.lang.String |
explain(Instance[] sequence)
Return some string that 'explains' the classification |
Classifier |
getClassifier()
|
Explanation |
getExplanation(Instance[] sequence)
Return and explanation for a classification |
int |
getHistorySize()
|
Viewer |
toGUI()
Create a view of this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMM(Classifier classifier, int historySize, ExampleSchema schema)
Method Detail |
---|
public Classifier getClassifier()
public int getHistorySize()
public ClassLabel[] classification(Instance[] sequence)
SequenceClassifier
classification
in interface SequenceClassifier
public double confidence(Instance[] sequence, ClassLabel[] predictedClasses, ClassLabel[] alternateClasses, int lo, int hi)
ConfidenceReportingSequenceClassifier
You can think of 'alternateClasses' as a sort of template, indicating constraints on the sequence of predictions that are allowed. 'Confidence' is confidence of the predictedClasses relative to the best-scoring prediction that is consistent with the 'alternateClasses' template. NULL values in the alternateClasses array indicate positions for which no alternate ClassLabels are required. In this case, the confidence returned should be (approximately) the maximum over all possible values for the slots filled with NULL values.
For instance, if all alternateClasses values outside the range lo..hi-1 are NULL, then an HMM sequenceClassifier should return the ratio running forward-backward on the predictedClasses and alternateClasses, with only the values between lo..hi-1 fixed.
Since classifications in the sequence are not independent, the values of 'alternateClasses' in positions outside of lo..hi-1 may affect this confidence.
confidence
in interface ConfidenceReportingSequenceClassifier
sequence
- is a sequence of instances to classifypredictedClasses
- is a classification of the
sequence, as given by a call to 'classify'alternateClasses
- is another possible classification of the sequence.lo
- is an index into sequence[] (or equivalently, any of the other array arguments)hi
- is another index into sequence[]
public java.lang.String explain(Instance[] sequence)
SequenceClassifier
explain
in interface SequenceClassifier
public Explanation getExplanation(Instance[] sequence)
SequenceClassifier
getExplanation
in interface SequenceClassifier
public Viewer toGUI()
Visible
toGUI
in interface Visible
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |