Package cc.mallet.classify
Class MostFrequentClassAssignmentTrainer
- java.lang.Object
-
- cc.mallet.classify.ClassifierTrainer<MostFrequentClassifier>
-
- cc.mallet.classify.MostFrequentClassAssignmentTrainer
-
- All Implemented Interfaces:
AlphabetCarrying
public class MostFrequentClassAssignmentTrainer extends ClassifierTrainer<MostFrequentClassifier> implements AlphabetCarrying
A Classifier Trainer to be used with MostFrequentClassifier.- Author:
- Martin Wunderlich martin@wunderlich.com
- See Also:
MostFrequentClassifier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cc.mallet.classify.ClassifierTrainer
ClassifierTrainer.ByActiveLearning<C extends Classifier>, ClassifierTrainer.ByIncrements<C extends Classifier>, ClassifierTrainer.ByInstanceIncrements<C extends Classifier>, ClassifierTrainer.ByOptimization<C extends Classifier>, ClassifierTrainer.Factory<CT extends ClassifierTrainer<? extends Classifier>>
-
-
Field Summary
-
Fields inherited from class cc.mallet.classify.ClassifierTrainer
finishedTraining, validationSet
-
-
Constructor Summary
Constructors Constructor Description MostFrequentClassAssignmentTrainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
alphabetsMatch(AlphabetCarrying object)
Alphabet
getAlphabet()
Alphabet[]
getAlphabets()
MostFrequentClassifier
getClassifier()
MostFrequentClassifier
train(InstanceList trainingSet)
Create a MostFrequent classifier from a set of training data.-
Methods inherited from class cc.mallet.classify.ClassifierTrainer
getValidationInstances, isFinishedTraining, setValidationInstances
-
-
-
-
Method Detail
-
getClassifier
public MostFrequentClassifier getClassifier()
- Specified by:
getClassifier
in classClassifierTrainer<MostFrequentClassifier>
-
train
public MostFrequentClassifier train(InstanceList trainingSet)
Create a MostFrequent classifier from a set of training data.- Specified by:
train
in classClassifierTrainer<MostFrequentClassifier>
- Parameters:
trainingList
- The InstanceList to be used to train the classifier.- Returns:
- The MostFrequent classifier as trained on the trainingList
-
alphabetsMatch
public boolean alphabetsMatch(AlphabetCarrying object)
-
getAlphabet
public Alphabet getAlphabet()
- Specified by:
getAlphabet
in interfaceAlphabetCarrying
-
getAlphabets
public Alphabet[] getAlphabets()
- Specified by:
getAlphabets
in interfaceAlphabetCarrying
-
-