Skip to contents

This functions generates a list with all the required parameters for the lmridge solver (control.solver.gen) & allows fine control over its options.

Usage

control.solver.gen(
  solver,
  method = NULL,
  maxit = NULL,
  standardize = NULL,
  reltol = NULL,
  tol = NULL,
  abstol = NULL,
  block_size = NULL,
  precond = NULL,
  pivot = NULL,
  ordering = NULL,
  NaturalOrdering = NULL,
  threshold = NULL,
  verbose = FALSE,
  rowaug = NULL
)

Arguments

solver

XXX

method

Solver-specific method. For solver="eigen", the exposed methods are 1L=Cholesky LLT, 2L=Cholesky LDLT, 3L=CG with incomplete Cholesky preconditioning for sparse systems or diagonal preconditioning for dense systems, 4L=LSCG with least-squares diagonal preconditioner, 5L=column-pivoted QR, and 6L=BDCSVD for dense systems or Jacobi SVD for sparse systems.

maxit

The maximum number of iterations.

standardize

XXX

reltol

XXX

tol

Relative convergence tolerance for Eigen iterative solvers. For CG the default is 1e-10; LSCG defaults to 1e-7. For LSCG, Eigen tests the normal-equation residual in the original coefficient coordinates; no additional external column equilibration is performed.

abstol

XXX

block_size

Optional block size used by solvers that support blocked updates.

precond

Optional integer preconditioner code for Eigen Jacobi SVD. For exposed Eigen iterative methods this is fixed by the chosen method: method 3L uses incomplete Cholesky CG for sparse systems and diagonal CG for dense systems; method 4L uses LSCG with least-squares diagonal preconditioning.

pivot

Optional integer pivoting code for Eigen QR and Cholesky methods. Defaults are method-specific.

ordering

Optional integer sparse ordering code for Eigen sparse QR and Cholesky methods. For sparse QR, 0L=AMD, 1L=COLAMD and 2L=NaturalOrdering, with 1L the default. For sparse Cholesky, 0L=AMD and 1L=NaturalOrdering, with 0L the default.

NaturalOrdering

Optional logical flag for Eigen sparse Cholesky ordering. If TRUE, sparse Cholesky LLT/LDLT use Eigen's NaturalOrdering; if FALSE, they use AMDOrdering. The default is FALSE. The integer ordering argument takes precedence when supplied.

threshold

Optional threshold for Eigen SVD rank decisions. If NULL, Eigen's default threshold is used.

verbose

XXX

rowaug

Whether to append diagonal ridge-penalty rows before solving the working least-squares problem. For Eigen LLT, LDLT and CG, NULL chooses direct Gram construction for dense designs and sparse augmentation for sparse designs, including dense-stored matrices with at least one million entries and fewer than 10 percent nonzeros. Explicit TRUE or FALSE overrides this choice. Existing rectangular QR, SVD and LSCG defaults are unchanged. Eligible wide Eigen systems use the Woodbury route instead.

Value

The function return a list with the required options to solve a linear weighted least squares lmridge ridge regression using the given solver and method.

See also

Examples

control.solver.gen(solver="osqp")