qr {kazaam}R Documentation

QR Decomposition Methods

Description

QR factorization.

Usage

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

## 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)


[Package kazaam version 0.1-0 Index]