Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rqb

Randomized QB Decomposition (rqb).


Description

Compute the near-optimal QB decomposition of a rectangular matrix.

Usage

rqb(A, k = NULL, p = 10, q = 2, sdist = "normal", rand = TRUE)

Arguments

A

array_like;
real/complex (m, n) input matrix (or data frame).

k

integer, optional;
target rank of the low-rank decomposition. It should satisfy k << min(m,n).

p

integer, optional;
oversampling parameter (default p=10).

q

integer, optional;
number of power iterations (default q=2).

sdist

string c( 'unif', 'normal', 'rademacher'), optional;
specifies the sampling distribution:
'unif' : Uniform '[-1,1]'.
'normal' (default) : Normal '~N(0,1)'.
'rademacher' : Rademacher random variates.

rand

bool, optional;
If (TRUE), a probabilistic strategy is used, otherwise a deterministic algorithm is used.

Details

The randomized QB decomposition factors a rectangular (m,n) matrix A as A = Q * B. Q is an (m,k) matrix with orthogonal columns, and B a (k,n) matrix. The target rank is assumed to be k << min(m,n).

p is an oversampling parameter to improve the approximation. A value between 5 and 10 is recommended, and p=10 is set by default.

The parameter q specifies the number of power (subspace) iterations to reduce the approximation error. This is recommended if the the singular values decay slowly. In practice 1 or 2 iterations achieve good results, however, computing power iterations increases the computational time. The number of power iterations is set to q=2 by default.

Value

rqb returns a list containing the following components:

Q

array_like;
matrix with orthogonal columns; (m, k) dimensional array.

B

array_like;
smaller matrix; (k, n) dimensional array.

Author(s)

N. Benjamin Erichson, erichson@berkeley.edu

References

  • [1] N. B. Erichson, S. Voronin, S. L. Brunton and J. N. Kutz. 2019. Randomized Matrix Decompositions Using R. Journal of Statistical Software, 89(11), 1-48. doi: 10.18637/jss.v089.i11.

  • [2] N. Halko, P. Martinsson, and J. Tropp. "Finding structure with randomness: probabilistic algorithms for constructing approximate matrix decompositions" (2009). (available at arXiv https://arxiv.org/abs/0909.4061).

See Also


rsvd

Randomized Singular Value Decomposition

v1.0.5
GPL (>= 3)
Authors
N. Benjamin Erichson [aut, cre]
Initial release
2021-04-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.