runRandomSVD: Approximate SVD with 'rsvd'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/runRandomSVD.R

Description

Perform a randomized singular value decomposition.

Usage

1
2
runRandomSVD(x, k=5, nu=k, nv=k, center=FALSE, scale=FALSE, deferred=FALSE,
    ..., fold=Inf, BPPARAM=SerialParam())

Arguments

x

A numeric matrix-like object to use in the SVD.

k

Integer scalar specifying the number of singular values to return.

nu

Integer scalar specifying the number of left singular vectors to return.

nv

Integer scalar specifying the number of right singular vectors to return.

center

A logical scalar indicating whether columns should be centered. Alternatively, a numeric vector or NULL - see ?"BiocSingular-options".

scale

A logical scalar indicating whether columns should be scaled. Alternatively, a numeric vector or NULL - see ?"BiocSingular-options".

deferred

Logical scalar indicating whether centering/scaling should be deferred, see ?"BiocSingular-options".

...

Further arguments to pass to rsvd.

fold

Numeric scalar specifying the minimum fold difference between dimensions of x to compute the cross-product, see ?"BiocSingular-options".

BPPARAM

A BiocParallelParam object specifying how parallelization should be performed.

Details

All multiplication operations in rsvd involving x will be parallelized according to the supplied BPPARAM.

The dimensionality of the working subspace is defined as the maximum of k, nu and nv, plus the q specified in ....

Value

A list containing:

Author(s)

Aaron Lun

See Also

rsvd for the underlying algorithm.

Examples

1
2
3
a <- matrix(rnorm(100000), ncol=20)
out <- runRandomSVD(a)
str(out)

BiocSingular documentation built on Nov. 8, 2020, 10:59 p.m.