Class ClassifierTrainer<C extends Classifier>

  extended by cc.mallet.classify.ClassifierTrainer<C>
Direct Known Subclasses:
AdaBoostM2Trainer, AdaBoostTrainer, BaggingTrainer, BalancedWinnowTrainer, C45Trainer, ClassifierEnsembleTrainer, ConfidencePredictingClassifierTrainer, DecisionTreeTrainer, FeatureSelectingClassifierTrainer, MaxEntGERangeTrainer, MaxEntGETrainer, MaxEntPRTrainer, MaxEntTrainer, MCMaxEntTrainer, NaiveBayesEMTrainer, NaiveBayesTrainer, WinnowTrainer

public abstract class ClassifierTrainer<C extends Classifier>
extends java.lang.Object

Each ClassifierTrainer trains one Classifier based on various interfaces for consuming training data. If you want an object that can train be asked to train on multiple different training sets and yield different classifiers, you probably want a ClassifierTrainer.Factory.

Nested Class Summary
static interface ClassifierTrainer.ByActiveLearning<C extends Classifier>
          For active learning, in which this trainer will select certain instances and request that the Labeler instance label them.
static interface ClassifierTrainer.ByIncrements<C extends Classifier>
          For various kinds of online learning by batches, where training instances are presented, consumed for learning immediately.
static interface ClassifierTrainer.ByInstanceIncrements<C extends Classifier>
          For online learning that can operate on one instance at a time.
static interface ClassifierTrainer.ByOptimization<C extends Classifier>
static class ClassifierTrainer.Factory<CT extends ClassifierTrainer<? extends Classifier>>
          Instances of a Factory know how to create new ClassifierTrainers to apply to new Classifiers.
Field Summary
protected  boolean finishedTraining
protected  InstanceList validationSet
Constructor Summary
Method Summary
abstract  C getClassifier()
 InstanceList getValidationInstances()
 boolean isFinishedTraining()
 void setValidationInstances(InstanceList validationSet)
abstract  C train(InstanceList trainingSet)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected InstanceList validationSet


protected boolean finishedTraining
Constructor Detail


public ClassifierTrainer()
Method Detail


public boolean isFinishedTraining()


public abstract C getClassifier()


public abstract C train(InstanceList trainingSet)


public void setValidationInstances(InstanceList validationSet)


public InstanceList getValidationInstances()