cc.mallet.pipe
Class AddClassifierTokenPredictions.TokenClassifiers

java.lang.Object
  extended by cc.mallet.classify.Classifier
      extended by cc.mallet.pipe.AddClassifierTokenPredictions.TokenClassifiers
All Implemented Interfaces:
AlphabetCarrying, java.io.Serializable
Enclosing class:
AddClassifierTokenPredictions

public static class AddClassifierTokenPredictions.TokenClassifiers
extends Classifier
implements java.io.Serializable

This inner class represents the trained token classifiers.

Author:
ghuang
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cc.mallet.classify.Classifier
instancePipe
 
Constructor Summary
AddClassifierTokenPredictions.TokenClassifiers(ClassifierTrainer trainer, InstanceList trainList, int randSeed, int numCV)
           
AddClassifierTokenPredictions.TokenClassifiers(InstanceList trainList)
          Train a token classifier using the given Instances with 5-fold cross validation
AddClassifierTokenPredictions.TokenClassifiers(InstanceList trainList, int randSeed, int numCV)
           
 
Method Summary
 Classification classify(Instance instance)
           
 Classification classify(Instance instance, boolean useOutOfFold)
           
 
Methods inherited from class cc.mallet.classify.Classifier
alphabetsMatch, classify, classify, classify, getAccuracy, getAlphabet, getAlphabets, getAverageRank, getF1, getF1, getF1, getFeatureSelection, getInstancePipe, getLabelAlphabet, getPerClassFeatureSelection, getPrecision, getPrecision, getPrecision, getRecall, getRecall, getRecall, print, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddClassifierTokenPredictions.TokenClassifiers

public AddClassifierTokenPredictions.TokenClassifiers(InstanceList trainList)
Train a token classifier using the given Instances with 5-fold cross validation

Parameters:
trainList - training instances

AddClassifierTokenPredictions.TokenClassifiers

public AddClassifierTokenPredictions.TokenClassifiers(InstanceList trainList,
                                                      int randSeed,
                                                      int numCV)

AddClassifierTokenPredictions.TokenClassifiers

public AddClassifierTokenPredictions.TokenClassifiers(ClassifierTrainer trainer,
                                                      InstanceList trainList,
                                                      int randSeed,
                                                      int numCV)
Method Detail

classify

public Classification classify(Instance instance)
Specified by:
classify in class Classifier

classify

public Classification classify(Instance instance,
                               boolean useOutOfFold)
Parameters:
instance - the instance to classify
useOutOfFold - whether to check the instance name and use the out-of-fold classifier if the instance name matches one in the training data
Returns:
the token classifier's output