cc.mallet.classify
Class MaxEntPRTrainer
java.lang.Object
cc.mallet.classify.ClassifierTrainer<MaxEnt>
cc.mallet.classify.MaxEntPRTrainer
- All Implemented Interfaces:
- ClassifierTrainer.ByOptimization<MaxEnt>
public class MaxEntPRTrainer
- extends ClassifierTrainer<MaxEnt>
- implements ClassifierTrainer.ByOptimization<MaxEnt>
Penalty (soft) version of Posterior Regularization (PR) for training MaxEnt.
- Author:
- Gregory Druck gdruck@cs.umass.edu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaxEntPRTrainer
public MaxEntPRTrainer()
MaxEntPRTrainer
public MaxEntPRTrainer(java.util.ArrayList<MaxEntPRConstraint> constraints)
setPGaussianPriorVariance
public void setPGaussianPriorVariance(double pGPV)
setQGaussianPriorVariance
public void setQGaussianPriorVariance(double qGPV)
setConstraintsFile
public void setConstraintsFile(java.lang.String filename)
setUseValues
public void setUseValues(boolean flag)
setMinIterations
public void setMinIterations(int minIterations)
setMaxIterations
public void setMaxIterations(int minIterations)
setNormalize
public void setNormalize(boolean normalize)
getOptimizer
public Optimizer getOptimizer()
- Specified by:
getOptimizer
in interface ClassifierTrainer.ByOptimization<MaxEnt>
getIteration
public int getIteration()
- Specified by:
getIteration
in interface ClassifierTrainer.ByOptimization<MaxEnt>
isFinishedTraining
public boolean isFinishedTraining()
- Overrides:
isFinishedTraining
in class ClassifierTrainer<MaxEnt>
getClassifier
public MaxEnt getClassifier()
- Specified by:
getClassifier
in class ClassifierTrainer<MaxEnt>
train
public MaxEnt train(InstanceList trainingSet)
- Specified by:
train
in class ClassifierTrainer<MaxEnt>
train
public MaxEnt train(InstanceList trainingSet,
int maxIterations)
- Specified by:
train
in interface ClassifierTrainer.ByOptimization<MaxEnt>
train
public MaxEnt train(InstanceList data,
int minIterations,
int maxIterations)