| .damped_bfgs | R Documentation |
Custom implementation of damped BFGS quasi-Newton optimization for minimizing the selected tuning criterion. Uses step-size damping with backtracking and Sherman-Morrison-Woodbury inverse Hessian updates.
.damped_bfgs(
par,
log_penalty_vec,
criterion_fxn,
gr_fxn,
env,
tol,
parallel_bfgs = TRUE,
max_iter = 100,
...
)
par |
Numeric vector; initial log-scale penalty parameters (first two elements are log(wiggle) and log(flat_ridge)). |
log_penalty_vec |
Numeric vector; log-scale predictor/partition penalties appended to the optimization vector. |
criterion_fxn |
Function; tuning-objective evaluation function with signature
|
gr_fxn |
Function; gradient function with signature
|
env |
List; tuning environment (passed through to
|
tol |
Numeric; convergence tolerance for parameter change and the strict absolute criterion-change check. A small scale-aware plateau check is also used after the first few iterations. |
max_iter |
Integer; maximum number of BFGS iterations (default 100). |
... |
Additional arguments passed to fitting functions. |
The optimizer uses the following strategy:
Iterations 1-2: steepest descent with damping.
Iteration 3+: BFGS quasi-Newton with inverse Hessian approximation updated via the standard secant condition. Falls back to identity matrix when the update is numerically unstable.
Step acceptance: Armijo-like criterion (accept if
\mathrm{GCV}_{u}^{(\mathrm{new})} \leq
\mathrm{GCV}_{u}^{(\mathrm{old})}).
Backtracking: damping factor halved on rejection; terminates
when damp < 2^{-10} (early iterations) or 2^{-12}
(later iterations).
Convergence: after iteration 9, stop when either the strict
tol checks are met or the accepted criterion changes remain
below a small criterion-scale tolerance for several iterations.
List containing the best parameter vector found, the corresponding criterion value, and the number of iterations performed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.