lol.project.rp: Random Projections (RP)

Description Usage Arguments Value Details Author(s) Examples

View source: R/rp.R

Description

A function for implementing gaussian random projections (rp).

Usage

1

Arguments

X

[n, d] the data with n samples in d dimensions.

r

the rank of the projection. Note that r >= K, and r < d.

scale

whether to scale the random projection by the sqrt(1/d). Defaults to TRUE.

...

trailing args.

Value

A list containing the following:

A

[d, r] the projection matrix from d to r dimensions.

Xr

[n, r] the n data points in reduced dimensionality r.

Details

For more details see the help vignette: vignette("rp", package = "lolR")

Author(s)

Eric Bridgeford

Examples

1
2
3
4
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.project.rp(X=X, r=5)  # use lol to project into 5 dimensions

neurodata/lol documentation built on Oct. 17, 2018, 8:58 a.m.