Package cc.mallet.classify
Class RankMaxEntTrainer
- java.lang.Object
-
- cc.mallet.classify.ClassifierTrainer<MaxEnt>
-
- cc.mallet.classify.MaxEntTrainer
-
- cc.mallet.classify.RankMaxEntTrainer
-
- All Implemented Interfaces:
Boostable,ClassifierTrainer.ByOptimization<MaxEnt>,java.io.Serializable
public class RankMaxEntTrainer extends MaxEntTrainer
The trainer for aRankMaxEntclassifier. 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.- Author:
- Aron Culotta culotta@cs.umass.edu
- 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
Constructors Constructor Description RankMaxEntTrainer()RankMaxEntTrainer(double gaussianPriorVariance)Constructs a trainer with a parameter to avoid overtraining.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optimizable.ByGradientValuegetMaximizableTrainer(InstanceList ilist)java.lang.StringtoString()Like the other version oftrainWithFeatureInduction, but allows some default options to be changed.MaxEnttrain(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
-
-
-
-
Method Detail
-
getMaximizableTrainer
public Optimizable.ByGradientValue getMaximizableTrainer(InstanceList ilist)
-
train
public MaxEnt train(InstanceList trainingSet)
- Overrides:
trainin classMaxEntTrainer
-
toString
public java.lang.String toString()
Like the other version of
trainWithFeatureInduction, but allows some default options to be changed.- Overrides:
toStringin classMaxEntTrainer- Parameters:
maxent- An initial partially-trained classifier (defaultnull). 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 ofMaxEntTrainer.EXP_GAIN,MaxEntTrainer.GRADIENT_GAIN, orMaxEntTrainer.INFORMATION_GAIN(defaultEXP_GAIN).- Returns:
- The trained
MaxEntclassifier
-
-