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
   )
 


Field Summary
 
Fields inherited from class mark.nlp.classifiers.HierarchicalClassifier
fC0, fChildren, fHC, fNumCats
 
Constructor Summary
ErrorCorrecting()
           
 
Method Summary
protected  mark.nlp.classifiers.Node genHierarchy(ObjectMap vocabulary, mark.nlp.classifiers.Node confusionClassifier, SimpleResults trainResults, FileCategorySet catSet, SparseBagInstance[] trainSparseBagInstances, java.lang.Object parameters)
           
 
Methods inherited from class mark.nlp.classifiers.HierarchicalClassifier
classify, genSubsetNode, instanceFactoryName, test, test, train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorCorrecting

public ErrorCorrecting()
Method Detail

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