lnsrch: Search along a line for a minimum within an optimisation...

lnsrchR Documentation

Search along a line for a minimum within an optimisation algorithm.

Description

This is a version of the function in Numerical Recipes. It is initialized with a function value and gradient, and it does a series of quadratic searches until a convergence criterion is reached. This version includes code for display the progress of iteration for debugging purposes.

Usage

lnsrch(xold, fold, g, p, func, dataList, stpmax, itermax=20, TOLX=1e-10, dbglev=0)

Arguments

xold

The current parameter vector value.

fold

The current function value.

g

The current gradient vector.

p

The current search direction vector.

func

The name of the function being optimized.

dataList

A list object containing objects specifying the function to be minimized.

stpmax

The maximum step size.

itermax

The maximum number of iterations. Default 20

TOLX

Convergence criterion.

dbglev

The level of output. 0: no output; 1: function and slope at each iteration. 2 and above: also results within iteration.

Value

A named list containing:

x:

The parameter vector at the final minimum.

check:

A boolean value indicating that problems were encountered.

Author(s)

Juan Li and James Ramsay

References

Press, W. H., Taukolsky, S. A., Vetterline, W. T. and Flannery, B. P. (2020) Numerical Recipes, Third Edition, Cambridge

See Also

smooth.surp


fda documentation built on May 31, 2023, 9:19 p.m.