Class RankMaxEntTrainer

  extended by cc.mallet.classify.ClassifierTrainer<MaxEnt>
      extended by cc.mallet.classify.MaxEntTrainer
          extended by cc.mallet.classify.RankMaxEntTrainer
All Implemented Interfaces:
Boostable, ClassifierTrainer.ByOptimization<MaxEnt>,

public class RankMaxEntTrainer
extends MaxEntTrainer

The trainer for a RankMaxEnt classifier. Expects Instance data to be a FeatureVectorSequence, and the target to be a String representation of the index of the true best FeatureVectorSequence. Note that the Instance target may be a Labels to indicate a tie for the best Instance.

Aron Culotta
See Also:
Serialized Form

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
RankMaxEntTrainer(double gaussianPriorVariance)
          Constructs a trainer with a parameter to avoid overtraining.
Method Summary
 Optimizable.ByGradientValue getMaximizableTrainer(InstanceList ilist)
 java.lang.String toString()
          Like the other version of trainWithFeatureInduction, but allows some default options to be changed.
 MaxEnt train(InstanceList trainingSet)
Methods inherited from class cc.mallet.classify.MaxEntTrainer
getClassifier, getIteration, getOptimizable, getOptimizable, getOptimizable, getOptimizer, getOptimizer, setClassifier, setGaussianPriorVariance, setL1Weight, setNumIterations, train
Methods inherited from class cc.mallet.classify.ClassifierTrainer
getValidationInstances, isFinishedTraining, setValidationInstances
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public RankMaxEntTrainer()


public RankMaxEntTrainer(double gaussianPriorVariance)
Constructs a trainer with a parameter to avoid overtraining. 1.0 is usually a reasonable default value.

Method Detail


public Optimizable.ByGradientValue getMaximizableTrainer(InstanceList ilist)


public MaxEnt train(InstanceList trainingSet)
train in class MaxEntTrainer


public java.lang.String toString()

Like the other version of trainWithFeatureInduction, but allows some default options to be changed.

toString in class MaxEntTrainer
maxent - An initial partially-trained classifier (default null). This classifier may be modified during training.
gainName - The estimate of gain (log-likelihood increase) we want our chosen features to maximize. Should be one of MaxEntTrainer.EXP_GAIN, MaxEntTrainer.GRADIENT_GAIN, or MaxEntTrainer.INFORMATION_GAIN (default EXP_GAIN).
The trained MaxEnt classifier