edu.umass.cs.mallet.base.classify
Class IncrementalClassifierTrainer

java.lang.Object
  extended byedu.umass.cs.mallet.base.classify.ClassifierTrainer
      extended byedu.umass.cs.mallet.base.classify.IncrementalClassifierTrainer
Direct Known Subclasses:
NaiveBayesTrainer

public abstract class IncrementalClassifierTrainer
extends ClassifierTrainer

Adds the notion of incremental training to a ClassifierTrainer, through the availability of incrementalTrain() methods, which parallel the train() methods.

A train method on an incrmental trainer behaves exactly as the train method on a non incremental trainer. Train() is stateless; all calls to train() are independent of each other. For incremental training, the user should call only the incrementalTrain() methods, which maintain state between calls.


Constructor Summary
IncrementalClassifierTrainer()
           
 
Method Summary
 Classifier incrementalTrain(InstanceList trainingSet)
          Return a new classifier tuned from an instanceList
 Classifier incrementalTrain(InstanceList trainingSet, InstanceList validationSet)
          Return a new classifier tuned using two arguments.
 Classifier incrementalTrain(InstanceList trainingSet, InstanceList validationSet, InstanceList testSet)
          Return a new classifier tuned using three arguments.
 Classifier incrementalTrain(InstanceList trainingSet, InstanceList validationSet, InstanceList testSet, ClassifierEvaluating evaluator)
          Return a new classifier tuned using four arguments.
abstract  Classifier incrementalTrain(InstanceList trainingSet, InstanceList validationSet, InstanceList testSet, ClassifierEvaluating evaluator, Classifier initialClassifier)
          Return a new classifier tuned using the five arguments.
abstract  void reset()
          Throw away the internal state of the trainer as set by incrementalTrain().
 
Methods inherited from class edu.umass.cs.mallet.base.classify.ClassifierTrainer
main, toString, train, train, train, train, train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncrementalClassifierTrainer

public IncrementalClassifierTrainer()
Method Detail

incrementalTrain

public Classifier incrementalTrain(InstanceList trainingSet)
Return a new classifier tuned from an instanceList

Parameters:
trainingSet - examples used to set parameters.

incrementalTrain

public Classifier incrementalTrain(InstanceList trainingSet,
                                   InstanceList validationSet)
Return a new classifier tuned using two arguments.

Parameters:
trainingSet - examples used to set parameters.
validationSet - examples used to tune meta-parameters. May be null.

incrementalTrain

public Classifier incrementalTrain(InstanceList trainingSet,
                                   InstanceList validationSet,
                                   InstanceList testSet)
Return a new classifier tuned using three arguments.

Parameters:
trainingSet - examples used to set parameters.
validationSet - examples used to tune meta-parameters. May be null.
testSet - examples not examined at all for training, but passed on to diagnostic routines. May be null.

incrementalTrain

public Classifier incrementalTrain(InstanceList trainingSet,
                                   InstanceList validationSet,
                                   InstanceList testSet,
                                   ClassifierEvaluating evaluator)
Return a new classifier tuned using four arguments.

Parameters:
trainingSet - examples used to set parameters.
validationSet - examples used to tune meta-parameters. May be null.
testSet - examples not examined at all for training, but passed on to diagnostic routines. May be null.
evaluator - May be null

incrementalTrain

public abstract Classifier incrementalTrain(InstanceList trainingSet,
                                            InstanceList validationSet,
                                            InstanceList testSet,
                                            ClassifierEvaluating evaluator,
                                            Classifier initialClassifier)
Return a new classifier tuned using the five arguments.

Parameters:
trainingSet - examples used to set parameters.
validationSet - examples used to tune meta-parameters. May be null.
testSet - examples not examined at all for training, but passed on to diagnostic routines. May be null.
evaluator - May be null
initialClassifier - training process may start from here. The parameters of the initialClassifier are not modified. May be null.

reset

public abstract void reset()
Throw away the internal state of the trainer as set by incrementalTrain(). Incremental trainers must be explicitly reset between a call of incrementalTrain() and a call to train().