Package cc.mallet.optimize
Class BackTrackLineSearch
- java.lang.Object
-
- cc.mallet.optimize.BackTrackLineSearch
-
- All Implemented Interfaces:
LineOptimizer.ByGradient
public class BackTrackLineSearch extends java.lang.Object implements LineOptimizer.ByGradient
-
-
Constructor Summary
Constructors Constructor Description BackTrackLineSearch(Optimizable.ByGradientValue optimizable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfaceLineOptimizer.ByGradient
-
-