Package cc.mallet.optimize

Examples of cc.mallet.optimize.LimitedMemoryBFGS.reset()


    }
    catch (Exception e) {
      e.printStackTrace();
    }
   
    optimizer.reset();
    try {
      converged = optimizer.optimize(numIterations);
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here


    MaxEntOptimizableByLabelDistribution opt = new  MaxEntOptimizableByLabelDistribution(dataLabeled,p);
    opt.setGaussianPriorVariance(pGPV);

    LimitedMemoryBFGS bfgs = new LimitedMemoryBFGS(opt);
    try { bfgs.optimize(); } catch (Exception e) { e.printStackTrace(); }
    bfgs.reset();
    try { bfgs.optimize(); } catch (Exception e) { e.printStackTrace(); }
   
    double value = 0;
    for (MaxEntPRConstraint constraint : q.getConstraintFeatures()) {
      // plus sign because this returns negative values
View Full Code Here

   
    PRAuxClassifierOptimizable optimizable = new PRAuxClassifierOptimizable(data,base,q);
   
    LimitedMemoryBFGS bfgs = new LimitedMemoryBFGS(optimizable);
    try { bfgs.optimize(); } catch (Exception e) { e.printStackTrace(); }
    bfgs.reset();
    try { bfgs.optimize(); } catch (Exception e) { e.printStackTrace(); }
   
    return base;
  }
}
View Full Code Here

        if (converged) {
          logger.info ("CRF training has converged, i="+iter);
          break;
        }
      }
      bfgs.reset();
    }
   
    ge.shutdown();
   
    return converged;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.