Package cc.mallet.fst
Class CRFTrainerByL1LabelLikelihood
- java.lang.Object
-
- cc.mallet.fst.TransducerTrainer
-
- cc.mallet.fst.CRFTrainerByLabelLikelihood
-
- cc.mallet.fst.CRFTrainerByL1LabelLikelihood
-
- All Implemented Interfaces:
TransducerTrainer.ByOptimization
public class CRFTrainerByL1LabelLikelihood extends CRFTrainerByLabelLikelihood
CRF trainer that implements L1-regularization.- Author:
- Kedar Bellare
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cc.mallet.fst.TransducerTrainer
TransducerTrainer.ByIncrements, TransducerTrainer.ByInstanceIncrements, TransducerTrainer.ByOptimization
-
-
Field Summary
-
Fields inherited from class cc.mallet.fst.CRFTrainerByLabelLikelihood
printGradient
-
-
Constructor Summary
Constructors Constructor Description CRFTrainerByL1LabelLikelihood(CRF crf)
CRFTrainerByL1LabelLikelihood(CRF crf, double l1Weight)
Constructor for CRF trainer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optimizer
getOptimizer(InstanceList trainingSet)
void
setL1RegularizationWeight(double l1Weight)
-
Methods inherited from class cc.mallet.fst.CRFTrainerByLabelLikelihood
getCRF, getGaussianPriorVariance, getIteration, getOptimizableCRF, getOptimizer, getTransducer, getUseHyperbolicPriorSharpness, getUseHyperbolicPriorSlope, getUseSparseWeights, isConverged, isFinishedTraining, setAddNoFactors, setGaussianPriorVariance, setHyperbolicPriorSharpness, setHyperbolicPriorSlope, setUseHyperbolicPrior, setUseSomeUnsupportedTrick, setUseSparseWeights, train, train, trainIncremental, trainWithFeatureInduction, trainWithFeatureInduction
-
Methods inherited from class cc.mallet.fst.TransducerTrainer
addEvaluator, addEvaluators, removeEvaluator, runEvaluators, train
-
-
-
-
Constructor Detail
-
CRFTrainerByL1LabelLikelihood
public CRFTrainerByL1LabelLikelihood(CRF crf)
-
CRFTrainerByL1LabelLikelihood
public CRFTrainerByL1LabelLikelihood(CRF crf, double l1Weight)
Constructor for CRF trainer.- Parameters:
crf
- CRF to train.l1Weight
- Weight of L1 term in objective (l1Weight*|w|). Higher L1 weight means sparser solutions.
-
-
Method Detail
-
setL1RegularizationWeight
public void setL1RegularizationWeight(double l1Weight)
-
getOptimizer
public Optimizer getOptimizer(InstanceList trainingSet)
- Overrides:
getOptimizer
in classCRFTrainerByLabelLikelihood
-
-