Learn R Programming

rerf (version 2.0.4)

RandMatCustom: Create a Random Matrix: custom

Description

Create a Random Matrix: custom

Usage

RandMatCustom(p, d, nnzSample, nnzProb, ...)

Arguments

p

the number of dimensions.

d

the number of desired columns in the projection matrix.

nnzSample

a vector specifying the number of non-zeros to sample at each d. Each entry should be less than p.

nnzProb

a vector specifying probabilities in one-to-one correspondance with nnzSample.

...

used to handle superfluous arguments passed in using paramList.

Value

A random matrix to use in running RerF.

Examples

Run this code
# NOT RUN {
p <- 28
d <- 8
nnzSample <- 1:8
nnzProb <- 1 / 36 * 1:8
paramList <- list(p = p, d = d, nnzSample, nnzProb)
set.seed(8)
(a <- do.call(RandMatCustom, paramList))
# }

Run the code above in your browser using DataLab