splat: splat

Description Usage Arguments Value References Examples

View source: R/pirouette.R

Description

Splat a matrix into a lower dimension.

Usage

1
splat(x, newdim = 2, prob = 1/sqrt(ncol(x)), retx = TRUE)

Arguments

x

a sparse matrix

newdim

new dimensionality

prob

the probability each entry of the rotation matrix is non-zero. 1/3 is one heuristic to use (for 3x faster processing), 1/sqrt(ncol(x)) is another, for sqrt(x)-fold faster processing.

retx

If true, return the splatted matrix as well as the rotation.

Value

a splatted Matrix

References

http://web.stanford.edu/~hastie/Papers/Ping/KDD06_rp.pdf

Examples

1
splat(matrix(runif(100), ncol=10), 2)

zachmayer/pirouette documentation built on May 4, 2019, 9:04 p.m.