cc.mallet.optimize
Class BackTrackLineSearch

java.lang.Object
  extended by cc.mallet.optimize.BackTrackLineSearch
All Implemented Interfaces:
LineOptimizer.ByGradient

public class BackTrackLineSearch
extends java.lang.Object
implements LineOptimizer.ByGradient


Constructor Summary
BackTrackLineSearch(Optimizable.ByGradientValue optimizable)
           
 
Method Summary
 double optimize(double[] line, double initialStep)
          Returns the last step size used.
 void setAbsTolx(double tolx)
          Sets the tolerance of absolute diff in function value.
 void setRelTolx(double tolx)
          Sets the tolerance of relative diff in function value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackTrackLineSearch

public BackTrackLineSearch(Optimizable.ByGradientValue optimizable)
Method Detail

setRelTolx

public void setRelTolx(double tolx)
Sets the tolerance of relative diff in function value. Line search converges if abs(delta x / x) < tolx for all coordinates.


setAbsTolx

public void setAbsTolx(double tolx)
Sets the tolerance of absolute diff in function value. Line search converges if abs(delta x) < tolx for all coordinates.


optimize

public double optimize(double[] line,
                       double initialStep)
Description copied from interface: LineOptimizer.ByGradient
Returns the last step size used.

Specified by:
optimize in interface LineOptimizer.ByGradient