trunc.svd {lfa} | R Documentation |
Truncated SVD
## S3 method for class 'svd' trunc(A, d, adjust = 3, tol = 1e-10, V = NULL, seed = NULL, ltrace = FALSE, override = FALSE)
A |
matrix |
d |
number of singular vectors |
adjust |
extra singular vectors to calculate for accuracy |
tol |
convergence criterion |
V |
optional initial guess |
seed |
seed |
ltrace |
debugging output |
override |
TRUE means we use fast.svd instead of the iterative algorithm (useful for small data or very high d). |
Performs singular value decomposition but only returns the first
d
singular vectors/values. The truncated SVD utilizes Lanczos
bidiagonalization. See references.
This function was modified from the package irlba 1.0.1 under
GPL. Replacing the crossprod()
calls with the C wrapper to
dgemv
is a dramatic difference in larger datasets. Since the
wrapper is technically not a matrix multiplication function, it seemed
wise to make a copy of the function.
list with singular value decomposition.