qr: QR Decomposition Methods

Description Usage Arguments Details Value Communication Examples

Description

QR factorization.

Usage

1
2
3
qr_R(x)

qr_Q(x, R)

Arguments

x

A shaq.

R

A regular matrix. This argument is optional, in that if it is not supplied explicitly, then it will be computed in the background. But if have already computed R, supplying it here will improve performance (by avoiding needlessly recomputing it).

Details

R is formed by first forming the crossproduct X^T X and taking its Cholesky factorization. But then Q = X R^{-1}. Inverting R is handled by an efficient triangular inverse routine.

Value

Q (a shaq) or R (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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)

R = qr_R(x)
comm.print(R)

Q = qr_Q(x, R)
Q

finalize()

## End(Not run)

RBigData/kazaam documentation built on Nov. 9, 2021, 9:09 a.m.