stepit: Compute a new step size for a linear search within an...

View source: R/stepit.R

stepitR Documentation

Compute a new step size for a linear search within an optimization algorithm.

Description

Using cubic interpolation, a new step size is computed for minimizing a function value.

Usage

  stepit(linemat, ips, dblwrd, MAXSTEP)

Arguments

linemat

A 3 by 5 matrix containing step sizes, function values and slopes at multiple values.

ips

If 1, previous slope was positive.

dblwrd

Vector of length 2: dblwrd[1] TRUE means step halved dblwrd[2] TRUE means step doubled.

MAXSTEP

maximum allowed size of a step.

Value

A positive step size.


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