Package cc.mallet.fst
Class MEMMTrainer
- java.lang.Object
-
- cc.mallet.fst.TransducerTrainer
-
- cc.mallet.fst.MEMMTrainer
-
public class MEMMTrainer extends TransducerTrainer
Trains and evaluates aMEMM
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MEMMTrainer.MEMMOptimizableByLabelLikelihood
Represents the terms in the objective function.-
Nested classes/interfaces inherited from class cc.mallet.fst.TransducerTrainer
TransducerTrainer.ByIncrements, TransducerTrainer.ByInstanceIncrements, TransducerTrainer.ByOptimization
-
-
Constructor Summary
Constructors Constructor Description MEMMTrainer(MEMM memm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIteration()
MEMMTrainer.MEMMOptimizableByLabelLikelihood
getOptimizableMEMM(InstanceList trainingSet)
Transducer
getTransducer()
boolean
isFinishedTraining()
void
printInstanceLists()
boolean
train(InstanceList training)
Trains a MEMM until convergence.boolean
train(InstanceList training, int numIterations)
Trains a MEMM for specified number of iterations or until convergence whichever occurs first; returns true if training converged within specified iterations.boolean
train(InstanceList training, InstanceList validation, InstanceList testing, TransducerEvaluator eval, int numIterations, int numIterationsPerProportion, double[] trainingProportions)
Not implemented yet.boolean
trainWithFeatureInduction(InstanceList trainingData, InstanceList validationData, InstanceList testingData, TransducerEvaluator eval, int numIterations, int numIterationsBetweenFeatureInductions, int numFeatureInductions, int numFeaturesPerFeatureInduction, double trueLabelProbThreshold, boolean clusteredFeatureInduction, double[] trainingProportions, java.lang.String gainName)
Not implemented yet.-
Methods inherited from class cc.mallet.fst.TransducerTrainer
addEvaluator, addEvaluators, removeEvaluator, runEvaluators
-
-
-
-
Constructor Detail
-
MEMMTrainer
public MEMMTrainer(MEMM memm)
-
-
Method Detail
-
getOptimizableMEMM
public MEMMTrainer.MEMMOptimizableByLabelLikelihood getOptimizableMEMM(InstanceList trainingSet)
-
train
public boolean train(InstanceList training)
Trains a MEMM until convergence.- Overrides:
train
in classTransducerTrainer
-
train
public boolean train(InstanceList training, int numIterations)
Trains a MEMM for specified number of iterations or until convergence whichever occurs first; returns true if training converged within specified iterations.- Specified by:
train
in classTransducerTrainer
-
train
public boolean train(InstanceList training, InstanceList validation, InstanceList testing, TransducerEvaluator eval, int numIterations, int numIterationsPerProportion, double[] trainingProportions)
Not implemented yet.- Throws:
java.lang.UnsupportedOperationException
-
trainWithFeatureInduction
public boolean trainWithFeatureInduction(InstanceList trainingData, InstanceList validationData, InstanceList testingData, TransducerEvaluator eval, int numIterations, int numIterationsBetweenFeatureInductions, int numFeatureInductions, int numFeaturesPerFeatureInduction, double trueLabelProbThreshold, boolean clusteredFeatureInduction, double[] trainingProportions, java.lang.String gainName)
Not implemented yet.- Throws:
java.lang.UnsupportedOperationException
-
printInstanceLists
public void printInstanceLists()
-
getIteration
public int getIteration()
- Specified by:
getIteration
in classTransducerTrainer
-
getTransducer
public Transducer getTransducer()
- Specified by:
getTransducer
in classTransducerTrainer
-
isFinishedTraining
public boolean isFinishedTraining()
- Specified by:
isFinishedTraining
in classTransducerTrainer
-
-