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

Module fletcher_reeves_cg

source code

Fletcher-Reeves conjugate gradient optimization.

This file is part of the minfx optimisation library at https://sourceforge.net/projects/minfx.

Classes [hide private]
  Fletcher_reeves
Functions [hide private]
 
fletcher_reeves(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='')
Fletcher-Reeves conjugate gradient algorithm.
source code
Variables [hide private]
  __package__ = 'minfx'

Imports: dot, Conjugate_gradient, Line_search, Min


Function Details [hide private]

fletcher_reeves(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 

Fletcher-Reeves conjugate gradient algorithm.

Page 120 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 = dot(gk+1, gk+1) / dot(gk, gk)
    • pk+1 = -gk+1 + bk+1.pk
    • k = k + 1