Automatically selects the SVD algorithm from the matrix dimensions:
Details
Randomised SVD (Halko et al., 2011): when target rank k << min(m, n)
Apple Accelerate / LAPACK: a full dense decomposition otherwise
Eigen BDCSVD: cross-platform divide-and-conquer fallback
Examples
set.seed(1L)
A <- matrix(rnorm(20 * 12), nrow = 20, ncol = 12)
res <- adaptive_svd(A, k = 5L, method = "auto")
length(res$d)
#> [1] 5
is.character(res$method_used)
#> [1] TRUE