mark.nlp.classifiers
Class ErrorCorrecting
java.lang.Object
|
+--mark.nlp.classifiers.HierarchicalClassifier
|
+--mark.nlp.classifiers.ErrorCorrecting
- All Implemented Interfaces:
- Classifier
- public class ErrorCorrecting
- extends HierarchicalClassifier
A classifier that attempts to correct errors made by another classifier.
ErrorCorrecting first trains a classifier c_0. Using c_0, ErrorCorrecting
generates a confusion matrix for the training set. It then analyzes the
confusion matrix. For each category t, it discovers which actual
categories t_0..t_n occur most often when c_0 predicts t. It then trains a
second classifier on t and t_0..t_n. ErrorCorrecting has then trained c_0
and an additional classifier for each category t. During classification,
ErrorCorrecting first sends the instance through c_0. Based on c_0's
prediction, it then hands off the instance to one of the second level
classifiers and returns the prediction of that second-level classifier.
The parameter for this classifier is:
(
c_0Classifier // c_0's name
c_0ClassifierParameter // c_0's parameter
clusterSize // 2nd level number of categories
featureOrdererName // 2nd level orderer name
featureOrdererParameter // 2nd level orderer parameter
numFeatures // 2nd level num features
classifierName // 2nd level classifier name
classifierParameter // 2nd level classifier parameter
)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErrorCorrecting
public ErrorCorrecting()
genHierarchy
protected mark.nlp.classifiers.Node genHierarchy(ObjectMap vocabulary,
mark.nlp.classifiers.Node confusionClassifier,
SimpleResults trainResults,
FileCategorySet catSet,
SparseBagInstance[] trainSparseBagInstances,
java.lang.Object parameters)
throws java.lang.Exception
- Specified by:
genHierarchy in class HierarchicalClassifier
java.lang.Exception