lobpcg_control: LOBPCG Eigensolver Control Options

View source: R/pca_imp.R

lobpcg_controlR Documentation

LOBPCG Eigensolver Control Options

Description

Construct a validated list of control options for the LOBPCG eigensolver used by pca_imp(). Most users do not need to call this directly.

Usage

lobpcg_control(warmup_iters = 10L, tol = 1e-09, maxiter = 20)

Arguments

warmup_iters

Integer. Number of warm-up iterations before the main LOBPCG solve. Must be non-negative.

tol

Numeric. Convergence tolerance for the LOBPCG eigensolver. Must be non-negative and finite.

maxiter

Integer. Maximum number of LOBPCG iterations. Must be non-negative. In pca_imp(), maxiter must be positive when solver = "auto" or solver = "lobpcg". Use solver = "exact" to force the exact solver.

Value

A named list of class "slideimp_lobpcg_control" containing warmup_iters, tol, and maxiter.

Examples

set.seed(123)
obj <- sim_mat(10, 10)$input

# Use all defaults
lobpcg_control()

# Override a single option
lobpcg_control(maxiter = 50)

# Force the exact solver from pca_imp()
pca_imp(obj, ncp = 2, solver = "exact")

# Pass directly to pca_imp()
pca_imp(obj, ncp = 2, lobpcg_control = lobpcg_control(tol = 1e-9))

# Or use a named list
pca_imp(obj, ncp = 2, lobpcg_control = list(maxiter = 50))


slideimp documentation built on June 17, 2026, 1:08 a.m.