rsvd {kazaam}R Documentation

rsvd

Description

Randomized singular value decomposition.

Usage

rsvd(x, k = 1, q = 2, retu = TRUE, retv = TRUE)

Arguments

x

The input data matrix.

k

The number of singular values and/or left/right singular vectors to estimate.

q

An integer exponent, say 1, 2, or 3. See the paper for details.

retu

Logical; should the left singular vectors ("U") be returned?

retv

Logical; should the right singular vectors ("V") be returned?

Details

TODO

Value

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.

Communication

The operation is completely local except for forming the crossproduct, which is an allreduce() call, quadratic on the number of columns.

References

Halko, Martinsson, and Tropp. 2011. Finding structure with randomness: probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review 53 217-288.

Examples

## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)

svd = rsvd(x)
comm.print(svd$d) # a globally owned vector
svd$u # a shaq
comm.print(svd$v) # a globally owned matrix

finalize()

## End(Not run)


[Package kazaam version 0.2-0 Index]