Package cc.mallet.optimize

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


    }
   
    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


    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

    LimitedMemoryBFGS optimizer = new LimitedMemoryBFGS(optimizable);

    // Optimize once
    try {
      optimizer.optimize();
    } catch (IllegalArgumentException e) {
      // step size too small
    }

    // Restart with a fresh initialization to improve likelihood
View Full Code Here

      // step size too small
    }

    // Restart with a fresh initialization to improve likelihood
    try {
      optimizer.optimize();
    } catch (IllegalArgumentException e) {
      // step size too small
    }
        dmrParameters = optimizable.getClassifier();
View Full Code Here

    // a better parameter setting
    int iter = 0;
    for (int reset = 0; reset < DEFAULT_NUM_RESETS + 1; reset++) {
      for (; iter < numIterations; iter++) {
        try {
          converged = bfgs.optimize (1);
          iteration++;
          logger.info ("CRF finished one iteration of maximizer, i="+iter);
          runEvaluators();
        } catch (IllegalArgumentException e) {
          e.printStackTrace();
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.