Package cc.mallet.fst

Examples of cc.mallet.fst.CRFOptimizableByGradientValues


    CRFOptimizableByGE ge = new CRFOptimizableByGE(crf,constraints,unlabeledSet,map,numThreads,geWeight);
    // turn off the prior... it already appears above!
    ge.setGaussianPriorVariance(Double.POSITIVE_INFINITY);

    CRFOptimizableByGradientValues opt =
      new CRFOptimizableByGradientValues(crf,new Optimizable.ByGradientValue[] { optLikelihood, ge });
   
    LimitedMemoryBFGS optimizer = new LimitedMemoryBFGS(opt);

    try {
      converged = optimizer.optimize(numIterations);
View Full Code Here


    CRFOptimizableByLabelLikelihood likelihood = new CRFOptimizableByLabelLikelihood(crf, labeled);
    likelihood.setGaussianPriorVariance(gaussianPriorVariance);
    CRFOptimizableByEntropyRegularization regularization = new CRFOptimizableByEntropyRegularization(crf, unlabeled);
    regularization.setScalingFactor(this.entRegScalingFactor);
   
    CRFOptimizableByGradientValues regLikelihood = new CRFOptimizableByGradientValues(crf,
        new Optimizable.ByGradientValue[] { likelihood, regularization} );
    this.bfgs = new LimitedMemoryBFGS(regLikelihood);
    converged = false;
    logger.info ("CRF about to train with "+numIterations+" iterations");
    // sometimes resetting the optimizer helps to find
View Full Code Here

    CRFOptimizableByLabelLikelihood likelihood = new CRFOptimizableByLabelLikelihood(crf, labeled);
    likelihood.setGaussianPriorVariance(gaussianPriorVariance);
    CRFOptimizableByEntropyRegularization regularization = new CRFOptimizableByEntropyRegularization(crf, unlabeled);
    regularization.setScalingFactor(this.entRegScalingFactor);
   
    CRFOptimizableByGradientValues regLikelihood = new CRFOptimizableByGradientValues(crf,
        new Optimizable.ByGradientValue[] { likelihood, regularization} );
    this.bfgs = new LimitedMemoryBFGS(regLikelihood);
    converged = false;
    logger.info ("CRF about to train with "+numIterations+" iterations");
    // sometimes resetting the optimizer helps to find
View Full Code Here

TOP

Related Classes of cc.mallet.fst.CRFOptimizableByGradientValues

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.