Package minfx :: Package line_search :: Module nocedal_wright_wolfe
[hide private]
[frames] | no frames]

Module nocedal_wright_wolfe

source code

A line search algorithm implemented using the strong Wolfe conditions.

This file is part of the minfx optimisation library.

Functions [hide private]
 
nocedal_wright_wolfe(func, func_prime, args, x, f, g, p, a_init=1.0, max_a=100000.0, mu=0.001, eta=0.9, tol=1e-10, print_flag=0)
A line search algorithm implemented using the strong Wolfe conditions.
source code
 
print_data(text, k, a)
Temp func for debugging.
source code
 
zoom(func, func_prime, args, f_count, g_count, x, f, g, p, mu, eta, i, a0, a_lo, a_hi, tol, print_flag=0)
Find the minimum function value in the open interval (a_lo, a_hi)
source code
Variables [hide private]
  __package__ = 'minfx.line_search'

Imports: deepcopy, dot, sqrt, cubic_ext, quadratic_fafbga, quadratic


Function Details [hide private]

nocedal_wright_wolfe(func, func_prime, args, x, f, g, p, a_init=1.0, max_a=100000.0, mu=0.001, eta=0.9, tol=1e-10, print_flag=0)

source code 

A line search algorithm implemented using the strong Wolfe conditions.

Algorithm 3.2, page 59, from 'Numerical Optimization' by Jorge Nocedal and Stephen J. Wright, 1999, 2nd ed.

Requires the gradient function.

These functions require serious debugging and recoding to work properly (especially the safeguarding)!

Parameters:
  • func (func) - The function to minimise.
  • func_prime (func) - The function which returns the gradient vector.
  • args (args) - The tuple of arguments to supply to the functions func and dfunc.
  • x (numpy array) - The parameter vector at minimisation step k.
  • f (float) - The function value at the point x.
  • g (numpy array) - The function gradient vector at the point x.
  • p (numpy array) - The descent direction.
  • a_init (flaot) - Initial step length.
  • a_max (float) - The maximum value for the step length.
  • mu (float) - Constant determining the slope for the sufficient decrease condition (0 < mu < eta < 1).
  • eta (float) - Constant used for the Wolfe curvature condition (0 < mu < eta < 1).
  • tol (float) - The function tolerance.
  • print_flag (int) - The higher the value, the greater the amount of info printed out.

zoom(func, func_prime, args, f_count, g_count, x, f, g, p, mu, eta, i, a0, a_lo, a_hi, tol, print_flag=0)

source code 

Find the minimum function value in the open interval (a_lo, a_hi)

Algorithm 3.3, page 60, from 'Numerical Optimization' by Jorge Nocedal and Stephen J. Wright, 1999, 2nd ed.