Package minfx :: Module polak_ribiere_plus_cg
[hide private]
[frames] | no frames]

Module polak_ribiere_plus_cg

source code

Polak-Ribiere + conjugate gradient optimization.

This file is part of the minfx optimisation library at https://gna.org/projects/minfx.

Classes [hide private]
  Polak_ribiere_plus
Functions [hide private]
 
polak_ribiere_plus(func=None, dfunc=None, args=(), x0=None, min_options=None, func_tol=1e-25, grad_tol=None, maxiter=1000000.0, a0=1.0, mu=0.0001, eta=0.1, full_output=0, print_flag=0, print_prefix='')
Polak-Ribiere + conjugate gradient algorithm.
source code
Variables [hide private]
  __package__ = 'minfx'

Imports: dot, Conjugate_gradient, Line_search, Min


Function Details [hide private]

polak_ribiere_plus(func=None, dfunc=None, args=(), x0=None, min_options=None, func_tol=1e-25, grad_tol=None, maxiter=1000000.0, a0=1.0, mu=0.0001, eta=0.1, full_output=0, print_flag=0, print_prefix='')

source code 

Polak-Ribiere + conjugate gradient algorithm.

Page 122 from 'Numerical Optimization' by Jorge Nocedal and Stephen J. Wright, 1999, 2nd ed. The algorithm is:

  • Given x0
  • Evaluate f0 = f(x0), g0 = g(x0)
  • Set p0 = -g0, k = 0
  • while g0 != 0:
    • Compute ak and set xk+1 = xk + ak.pk
    • Evaluate gk+1
    • bk+1 = max(dot(gk+1, (gk+1 - gk)) / dot(gk, gk), 0)
    • pk+1 = -gk+1 + bk+1.pk
    • k = k + 1