cc.mallet.classify
Class MaxEntGERangeTrainer
java.lang.Object
cc.mallet.classify.ClassifierTrainer<MaxEnt>
cc.mallet.classify.MaxEntGERangeTrainer
- All Implemented Interfaces:
- Boostable, ClassifierTrainer.ByOptimization<MaxEnt>, java.io.Serializable
public class MaxEntGERangeTrainer
- extends ClassifierTrainer<MaxEnt>
- implements ClassifierTrainer.ByOptimization<MaxEnt>, Boostable, java.io.Serializable
Training of MaxEnt models with labeled features using
Generalized Expectation Criteria.
Based on:
"Learning from Labeled Features using Generalized Expectation Criteria"
Gregory Druck, Gideon Mann, Andrew McCallum
SIGIR 2008
- Author:
- Gregory Druck gdruck@cs.umass.edu
Better explanations of parameters is given in MaxEntOptimizableByGE
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
constraints
protected java.util.ArrayList<MaxEntGEConstraint> constraints
MaxEntGERangeTrainer
public MaxEntGERangeTrainer()
MaxEntGERangeTrainer
public MaxEntGERangeTrainer(java.util.ArrayList<MaxEntGEConstraint> constraints)
MaxEntGERangeTrainer
public MaxEntGERangeTrainer(java.util.ArrayList<MaxEntGEConstraint> constraints,
MaxEnt classifier)
setConstraintsFile
public void setConstraintsFile(java.lang.String filename)
setTemperature
public void setTemperature(double temp)
setGaussianPriorVariance
public void setGaussianPriorVariance(double variance)
getClassifier
public MaxEnt getClassifier()
- Specified by:
getClassifier
in class ClassifierTrainer<MaxEnt>
setUseValues
public void setUseValues(boolean flag)
setNormalize
public void setNormalize(boolean normalize)
getOptimizable
public Optimizable.ByGradientValue getOptimizable(InstanceList trainingList)
getOptimizer
public Optimizer getOptimizer()
- Specified by:
getOptimizer
in interface ClassifierTrainer.ByOptimization<MaxEnt>
setOptimizer
public void setOptimizer(Optimizer opt)
setMaxIterations
public void setMaxIterations(int iter)
- Specifies the maximum number of iterations to run during a single call
to
train
or trainWithFeatureInduction
.
getIteration
public int getIteration()
- Specified by:
getIteration
in interface ClassifierTrainer.ByOptimization<MaxEnt>
train
public MaxEnt train(InstanceList trainingList)
- Specified by:
train
in class ClassifierTrainer<MaxEnt>
train
public MaxEnt train(InstanceList train,
int maxIterations)
- Specified by:
train
in interface ClassifierTrainer.ByOptimization<MaxEnt>