ceres_control: Solver options for ceres_nls

View source: R/ceres_nls.R

ceres_controlR Documentation

Solver options for ceres_nls

Description

Options for ceres_nls. The defaults of function_tol and parameter_tol are tighter than those of Ceres Solver (1e-6 and 1e-8), which can stop noticeably short of the solution. The other defaults are those of Ceres Solver.

Usage

ceres_control(max_iter = 50, function_tol = 1e-10, gradient_tol = 1e-10,
              parameter_tol = 1e-10, method = c("lm", "dogleg"),
              diff = c("central", "forward"), trace = FALSE)

Arguments

max_iter

the maximum number of iterations of each solve. A fit with parameters at a bound can have several, see ceres_nls.

function_tol

stop when the relative change in the cost is below this.

gradient_tol

stop when the largest gradient element is below this.

parameter_tol

stop when the relative step size is below this.

method

the trust region strategy: Levenberg-Marquardt or dogleg.

diff

the finite differences used when ceres_nls() has no jac. "central" is more accurate and "forward" needs fewer calls of fn. Next to a bound, one-sided differences are used in either case.

trace

if TRUE, print the progress of the solver.

Value

A list of class "ceres_control".

See Also

ceres_nls

Examples

ceres_control(max_iter = 200, method = "dogleg")$max_iter

ceres documentation built on Nov. 28, 2026, 1:07 a.m.