lnsrch | R Documentation |
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.
lnsrch(xold, fold, g, p, func, dataList, stpmax, itermax=20, TOLX=1e-10, dbglev=0)
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. |
A named list containing:
x: |
The parameter vector at the final minimum. |
check: |
A boolean value indicating that problems were encountered. |
Juan Li and James Ramsay
Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.
Press, W. H., Taukolsky, S. A., Vetterline, W. T. and Flannery, B. P. (2020) Numerical Recipes, Third Edition, Cambridge.
smooth.surp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.