Package cc.mallet.fst.semi_supervised
Class CRFTrainerByLikelihoodAndGE
- java.lang.Object
-
- cc.mallet.fst.TransducerTrainer
-
- cc.mallet.fst.semi_supervised.CRFTrainerByLikelihoodAndGE
-
public class CRFTrainerByLikelihoodAndGE extends TransducerTrainer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cc.mallet.fst.TransducerTrainer
TransducerTrainer.ByIncrements, TransducerTrainer.ByInstanceIncrements, TransducerTrainer.ByOptimization
-
-
Constructor Summary
Constructors Constructor Description CRFTrainerByLikelihoodAndGE(CRF crf, java.util.ArrayList<GEConstraint> constraints, StateLabelMap map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIteration()
Transducer
getTransducer()
boolean
isFinishedTraining()
void
setGaussianPriorVariance(double gpv)
void
setGEWeight(double weight)
void
setInitSupervised(boolean flag)
void
setNumThreads(int numThreads)
void
setSupervisedIterations(int iterations)
boolean
train(InstanceList trainingSet, int numIterations)
Train the transducer associated with this TransducerTrainer.boolean
train(InstanceList trainingSet, InstanceList unlabeledSet, int numIterations)
-
Methods inherited from class cc.mallet.fst.TransducerTrainer
addEvaluator, addEvaluators, removeEvaluator, runEvaluators, train
-
-
-
-
Constructor Detail
-
CRFTrainerByLikelihoodAndGE
public CRFTrainerByLikelihoodAndGE(CRF crf, java.util.ArrayList<GEConstraint> constraints, StateLabelMap map)
-
-
Method Detail
-
setGEWeight
public void setGEWeight(double weight)
-
setGaussianPriorVariance
public void setGaussianPriorVariance(double gpv)
-
setInitSupervised
public void setInitSupervised(boolean flag)
-
setSupervisedIterations
public void setSupervisedIterations(int iterations)
-
setNumThreads
public void setNumThreads(int numThreads)
-
getTransducer
public Transducer getTransducer()
- Specified by:
getTransducer
in classTransducerTrainer
-
getIteration
public int getIteration()
- Specified by:
getIteration
in classTransducerTrainer
-
isFinishedTraining
public boolean isFinishedTraining()
- Specified by:
isFinishedTraining
in classTransducerTrainer
-
train
public boolean train(InstanceList trainingSet, InstanceList unlabeledSet, int numIterations)
-
train
public boolean train(InstanceList trainingSet, int numIterations)
Description copied from class:TransducerTrainer
Train the transducer associated with this TransducerTrainer. You should be able to call this method with different trainingSet objects. Whether this causes the TransducerTrainer to combine both trainingSets or to view the second as a new alternative is at the discretion of the particular TransducerTrainer subclass involved.- Specified by:
train
in classTransducerTrainer
-
-