dogleg: Dogleg Trust-Region Optimization

View source: R/dogleg.R

doglegR Documentation

Dogleg Trust-Region Optimization

Description

Implements the standard Powell's Dogleg Trust-Region algorithm for non-linear optimization.

Usage

dogleg(
  start,
  objective,
  gradient = NULL,
  hessian = NULL,
  lower = -Inf,
  upper = Inf,
  control = list(),
  ...
)

Arguments

start

Numeric vector. Starting values for the optimization parameters.

objective

Function. The objective function to minimize.

gradient

Function (optional). Gradient of the objective function.

hessian

Function (optional). Hessian matrix of the objective function.

lower

Numeric vector. Lower bounds for box constraints.

upper

Numeric vector. Upper bounds for box constraints.

control

List. Control parameters including convergence flags:

  • use_abs_f: Logical. Use absolute change in objective for convergence.

  • use_rel_f: Logical. Use relative change in objective for convergence.

  • use_abs_x: Logical. Use absolute change in parameters for convergence.

  • use_rel_x: Logical. Use relative change in parameters for convergence.

  • use_grad: Logical. Use gradient norm for convergence.

  • use_posdef: Logical. Verify positive definiteness at convergence.

  • use_pred_f: Logical. Record predicted objective decrease.

  • use_pred_f_avg: Logical. Record average predicted decrease.

...

Additional arguments passed to objective, gradient, and Hessian functions.

Details

This function implements the classic Dogleg method within a Trust-Region framework, based on the strategy proposed by Powell (1970).

Trust-Region vs. Line Search: Trust-Region methods define a neighborhood around the current point (the trust region with radius \Delta) where a local quadratic model is assumed to be reliable. Unlike Line Search methods that first determine a search direction and then find an appropriate step length, this approach constrains the step size first and then finds the optimal update within that boundary.

Powell's Dogleg Trajectory: The "Dogleg" trajectory is a piecewise linear path connecting:

  1. The current point.

  2. The Cauchy Point (p_C): The minimizer of the quadratic model along the steepest descent direction.

  3. The Newton Point (p_N): The unconstrained minimizer of the quadratic model (B^{-1}g).

The algorithm selects a step along this path such that it minimizes the quadratic model while remaining within the radius \Delta.

Relationship to Double Dogleg: While the double_dogleg algorithm (Dennis and Mei, 1979) introduces a bias point to follow the Newton direction more closely, this standard Dogleg follows the original two-segment trajectory.

Value

A list containing optimization results and iteration metadata.

References

  • Powell, M. J. D. (1970). A Hybrid Method for Nonlinear Equations. Numerical Methods for Nonlinear Algebraic Equations.

  • Nocedal, J., & Wright, S. J. (2006). Numerical Optimization. Springer.

Examples

quad <- function(x) (x[1] - 2)^2 + (x[2] + 1)^2
res <- dogleg(start = c(0, 0), objective = quad)
print(res$par)

optimflex documentation built on April 11, 2026, 5:06 p.m.