Usage
irlba(A, nv = 5, nu, maxit = 1000, work = nv + 7, reorth = TRUE, tol = 1e-05, v = NULL, right_only = FALSE, verbose = FALSE, scale, center, du, ds, dv, shift, mult, fastpath = TRUE)
Arguments
A
numeric real- or complex-valued matrix or real-valued sparse matrix.
nv
number of right singular vectors to estimate.
nu
number of left singular vectors to estimate (defaults to nv
).
maxit
maximum number of iterations.
work
working subspace dimension, larger values can speed convergence at the cost of more memory use.
reorth
if TRUE
, apply full reorthogonalization to both SVD bases, otherwise
only apply reorthogonalization to the right SVD basis vectors; the latter case is cheaper per
iteration but, overall, may require more iterations for convergence. Always set to TRUE
when fastpath=TRUE
(see below).
tol
convergence is determined when $||AV - US|| < tol*||A||$,
where the spectral norm ||A|| is approximated by the
largest estimated singular value, and U, V, S are the matrices corresponding
to the estimated left and right singular vectors, and diagonal matrix of
estimated singular values, respectively.
v
optional starting vector or output from a previous run of irlba
used
to restart the algorithm from where it left off (see the notes).
right_only
logical value indicating return only the right singular vectors
(TRUE
) or both sets of vectors (FALSE
). The right_only option can be
cheaper to compute and use much less memory when nrow(A) >> ncol(A)
but note
that right_only = TRUE
sets fastpath = FALSE
(only use this option
for really large problems that run out of memory).
verbose
logical value that when TRUE
prints status messages during the computation.
scale
optional column scaling vector whose values divide each column of A
;
must be as long as the number of columns of A
(see notes).
center
optional column centering vector whose values are subtracted from each
column of A
; must be as long as the number of columns of A
and may
du
DEPRECATED optional subspace deflation vector (see notes).
ds
DEPRECATED optional subspace deflation scalar (see notes).
dv
DEPRECATED optional subspace deflation vector (see notes).
shift
optional shift value (square matrices only, see notes).
mult
optional custom matrix multiplication function (default is %*%
, see notes).
fastpath
try a fast C algorithm implementation if possible; set fastpath=FALSE
to use the reference R implementation. See notes.