Package cc.mallet.pipe
Class AddClassifierTokenPredictions.TokenClassifiers
- java.lang.Object
-
- cc.mallet.classify.Classifier
-
- 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
Constructors Constructor Description TokenClassifiers(ClassifierTrainer trainer, InstanceList trainList, int randSeed, int numCV)
TokenClassifiers(InstanceList trainList)
Train a token classifier using the given Instances with 5-fold cross validationTokenClassifiers(InstanceList trainList, int randSeed, int numCV)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
TokenClassifiers
public TokenClassifiers(InstanceList trainList)
Train a token classifier using the given Instances with 5-fold cross validation- Parameters:
trainList
- training instances
-
TokenClassifiers
public TokenClassifiers(InstanceList trainList, int randSeed, int numCV)
-
TokenClassifiers
public TokenClassifiers(ClassifierTrainer trainer, InstanceList trainList, int randSeed, int numCV)
-
-
Method Detail
-
classify
public Classification classify(Instance instance)
- Specified by:
classify
in classClassifier
-
classify
public Classification classify(Instance instance, boolean useOutOfFold)
- Parameters:
instance
- the instance to classifyuseOutOfFold
- 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
-
-