cc.mallet.fst
Class CRFTrainerByL1LabelLikelihood

java.lang.Object
  extended by cc.mallet.fst.TransducerTrainer
      extended by cc.mallet.fst.CRFTrainerByLabelLikelihood
          extended by 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
CRFTrainerByL1LabelLikelihood(CRF crf)
           
CRFTrainerByL1LabelLikelihood(CRF crf, double l1Weight)
          Constructor for CRF trainer.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class CRFTrainerByLabelLikelihood