Description Usage Arguments Details Value Communication Examples
Singular value decomposition.
1 2 3 4 5 6 7 8 9 10 11 | ## S4 method for signature 'shaq'
svd(x, nu = min(n, p), nv = min(n, p), LINPACK = FALSE)
## S4 method for signature 'tshaq'
svd(x, nu = min(n, p), nv = min(n, p), LINPACK = FALSE)
## S4 method for signature 'shaq'
La.svd(x, nu = min(n, p), nv = min(n, p))
## S4 method for signature 'tshaq'
La.svd(x, nu = min(n, p), nv = min(n, p))
|
x |
A shaq. |
nu |
number of left singular vectors to return. |
nv |
number of right singular vectors to return. |
LINPACK |
Ignored. |
The factorization works by first forming the crossproduct X^T X for shaqs (XX^T for tshaqs) and then taking its eigenvalue decomposition. In this case, the square root of the eigenvalues are the singular values.
For shaqs, if the left/right singular vectors U or V are desired, then in either case, V is computed (the eigenvectors). From these, U can be reconstructed, since if X = UΣ V^T, then U = XVΣ^{-1}. For tshaqs, a similar game can be played, noting that the left singular vectors U map to the eigenvectors of XX^T.
A list of elements d
, u
, and v
, as with R's own
svd()
. The elements are, respectively, a regular vector, a shaq, and
a regular matrix.
The operation is completely local except for forming the crossproduct, which
is an allreduce()
call, quadratic on the number of columns.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.