cc.mallet.optimize
Class LimitedMemoryBFGS

java.lang.Object
  extended by cc.mallet.optimize.LimitedMemoryBFGS
All Implemented Interfaces:
Optimizer

public class LimitedMemoryBFGS
extends java.lang.Object
implements Optimizer


Nested Class Summary
 
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizer
Optimizer.ByBatches
 
Constructor Summary
LimitedMemoryBFGS(Optimizable.ByGradientValue function)
           
 
Method Summary
 int getIteration()
           
 Optimizable getOptimizable()
           
 boolean isConverged()
           
 boolean optimize()
           
 boolean optimize(int numIterations)
           
 void reset()
          Resets the previous gradients and values that are used to approximate the Hessian.
 void setEvaluator(OptimizerEvaluator.ByGradient eval)
           
 void setLineOptimizer(LineOptimizer.ByGradient lineOpt)
          Sets the LineOptimizer.ByGradient to use in L-BFGS optimization.
 void setTolerance(double newtol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedMemoryBFGS

public LimitedMemoryBFGS(Optimizable.ByGradientValue function)
Method Detail

getOptimizable

public Optimizable getOptimizable()
Specified by:
getOptimizable in interface Optimizer

isConverged

public boolean isConverged()
Specified by:
isConverged in interface Optimizer

setLineOptimizer

public void setLineOptimizer(LineOptimizer.ByGradient lineOpt)
Sets the LineOptimizer.ByGradient to use in L-BFGS optimization.

Parameters:
lineOpt - line optimizer for L-BFGS

setTolerance

public void setTolerance(double newtol)

setEvaluator

public void setEvaluator(OptimizerEvaluator.ByGradient eval)

getIteration

public int getIteration()

optimize

public boolean optimize()
Specified by:
optimize in interface Optimizer

optimize

public boolean optimize(int numIterations)
Specified by:
optimize in interface Optimizer

reset

public void reset()
Resets the previous gradients and values that are used to approximate the Hessian. NOTE - If the Optimizable object is modified externally, this method should be called to avoid IllegalStateExceptions.