Turi Create
4.0
|
Functions | |
bool | turi::optimization::cstep (double &stx, double &fx, double &dx, double &sty, double &fy, double &dy, double &stp, double &fp, double &dp, bool &brackt, double stpmin, double stpmax) |
template<typename Vector > | |
ls_return | turi::optimization::more_thuente (first_order_opt_interface &model, double init_step, double init_func_value, DenseVector point, Vector gradient, DenseVector direction, double function_scaling=1.0, const std::shared_ptr< smooth_regularizer_interface > reg=NULL, size_t max_function_evaluations=LS_MAX_ITER) |
template<typename Vector > | |
ls_return | turi::optimization::armijo_backtracking (first_order_opt_interface &model, double init_step, double init_func_value, DenseVector point, Vector gradient, DenseVector direction) |
template<typename Vector > | |
ls_return | turi::optimization::backtracking (first_order_opt_interface &model, double init_step, double init_func_value, DenseVector point, Vector gradient, DenseVector direction, const std::shared_ptr< regularizer_interface > reg=NULL) |
double | turi::optimization::gradient_bracketed_linesearch (double dist, double f1, double f2, double g1, double g2) |
|
inline |
Armijo backtracking to compute step sizes for line search methods.
Line search based on an backtracking strategy to ensure sufficient decrease in function values at each iteration.
References: (1) Wright S.J and J. Nocedal. Numerical optimization. Vol. 2. New York: Springer, 1999.
[in] | model | Any model with a first order optimization interface. |
[in] | init_step | Initial step size. |
[in] | init_func | Initial function value. |
[in] | point | Starting point for the solver. |
[in] | gradient | Gradient value at this point. |
[in] | direction | Direction of the next step . |
Definition at line 615 of file line_search-inl.hpp.
|
inline |
Backtracking to compute step sizes for line search methods.
Line search based on an backtracking strategy to "some" decrease in function values at each iteration.
References: (1) Wright S.J and J. Nocedal. Numerical optimization. Vol. 2. New York: Springer, 1999.
[in] | model | Any model with a first order optimization interface. |
[in] | init_step | Initial step size. |
[in] | init_func | Initial function value. |
[in] | point | Starting point for the solver. |
[in] | gradient | Gradient value at this point. |
[in] | direction | Direction of the next step . |
[in] | reg | Regularizer interface! |
Definition at line 681 of file line_search-inl.hpp.
|
inline |
"Zoom" phase for More and Thuente line seach.
This code is a C++ port of Jorge Nocedal's implementaiton of More and Thuente [2] line search. This code was availiable at http://www.ece.northwestern.edu/~nocedal/lbfgs.html
Nocedal's Condition for Use: This software is freely available for educational or commercial purposes. We expect that all publications describing work using this software quote at least one of the references given below. This software is released under the BSD License
The purpose of cstep is to compute a safeguarded step for a linesearch and to update an interval of uncertainty for a minimizer of the function.
The parameter stx contains the step with the least function value. The parameter stp contains the current step. It is assumed that the derivative at stx is negative in the direction of the step. If brackt is set true then a minimizer has been bracketed in an interval of uncertainty with endpoints stx and sty.
[in] | stx | Best step obtained so far. |
[in] | fx | Function value at the best step so far. |
[in] | dx | Directional derivative at the best step so far. |
[in] | sty | Step at the end point of the uncertainty interval. |
[in] | fy | Function value at end point of uncertainty interval. |
[in] | dy | Directional derivative at end point of uncertainty interval. |
[in] | stp | Current step. |
[in] | fp | Function value at current step. |
[in] | dp | Directional derivative at the current step. |
[in] | brackt | Has the minimizer has been bracketed? |
[in] | stpmin | Min step size |
[in] | stpmax | Max step size. |
Definition at line 76 of file line_search-inl.hpp.
|
inline |
This function estimates a minumum point between two function values with known gradients.
The minimum value must lie between the two function values, f1 and f2, and the gradients must indicate the minimum lies between the two values and that the function is convex.
Under these situations, a third degree polynomial / cubic spline can be fit to the two function points, and this is gauranteed to have a single minimum between f1 and f2. This is what this function returns.
[in] | dist | The distance between the points f1 and f2. |
[in] | f1 | The value of the function at the left point. |
[in] | f2 | The value of the function at the right point. |
[in] | g1 | The derivative of the function at the left point. |
[in] | g2 | The derivative of the function at the right point. |
Definition at line 744 of file line_search-inl.hpp.
|
inline |
Compute step sizes for line search methods to satisfy Strong Wolfe conditions.
This code is a C++ port of Jorge Nocedal's implementaiton of More and Thuente [2] line search. This code was availiable at http://www.ece.northwestern.edu/~nocedal/lbfgs.html
Line search based on More' and Thuente [1] to find a step which satisfies a Wolfe conditions for sufficient decrease condition and a curvature condition.
At each stage the function updates an interval of uncertainty with endpoints. The interval of uncertainty is initially chosen so that it contains a minimizer of the modified function
f(x+stp*s) - f(x) - ftol*stp*(gradf(x)'s).
If a step is obtained for which the modified function has a nonpositive function value and nonnegative derivative, then the interval of uncertainty is chosen so that it contains a minimizer of f(x+stp*s).
The algorithm is designed to find a step which satisfies the sufficient decrease condition f(x+stp*s) .le. f(x) + ftol*stp*(gradf(x)'s), [W1] and the curvature condition std::abs(gradf(x+stp*s)'s)) .le. gtol*std::abs(gradf(x)'s). [W2]
References:
(1) More, J. J. and D. J. Thuente. "Line Search Algorithms with Guaranteed Sufficient Decrease." ACM Transactions on Mathematical Software 20, no. 3 (1994): 286-307.
(2) Wright S.J and J. Nocedal. Numerical optimization. Vol. 2. New York: Springer, 1999.
[in] | model | Any model with a first order optimization interface. |
[in] | init_step | Initial step size |
[in] | point | Starting point for the solver. |
[in] | gradient | Gradient value at this point (saves computation) |
[in] | reg | Shared ptr to an interface to a smooth regularizer. |
Definition at line 329 of file line_search-inl.hpp.