cc.mallet.optimize
Class LimitedMemoryBFGS
java.lang.Object
cc.mallet.optimize.LimitedMemoryBFGS
- All Implemented Interfaces:
- Optimizer
public class LimitedMemoryBFGS
- extends java.lang.Object
- implements Optimizer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitedMemoryBFGS
public LimitedMemoryBFGS(Optimizable.ByGradientValue function)
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.