trunc.svd: Truncated singular value decomposition

Description Usage Arguments Details Value

Description

Truncated SVD

Usage

1
2
3
## S3 method for class 'svd'
trunc(A, d, adjust = 3, tol = 1e-10, V = NULL,
  seed = NULL, ltrace = FALSE, override = FALSE)

Arguments

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).

Details

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.

Value

list with singular value decomposition.


lfa documentation built on Nov. 8, 2020, 7:30 p.m.