RandMatBinary: Create a Random Matrix: Binary

Description Usage Arguments Value Examples

View source: R/RandMat.R

Description

Create a Random Matrix: Binary

Usage

1
RandMatBinary(p, d, sparsity, prob, catMap = NULL, ...)

Arguments

p

the number of dimensions.

d

the number of desired columns in the projection matrix.

sparsity

a real number in (0,1) that specifies the distribution of non-zero elements in the random matrix.

prob

a probability \in (0,1) used for sampling from {-1,1} where prob = 0 will only sample -1 and prob = 1 will only sample 1.

catMap

a list specifying specifies which one-of-K encoded columns in X correspond to the same categorical feature.

...

used to handle superfluous arguments passed in using paramList.

Value

A random matrix to use in running RerF.

Examples

1
2
3
4
5
6
p <- 8
d <- 3
sparsity <- 0.25
prob <- 0.5
set.seed(4)
(a <- RandMatBinary(p, d, sparsity, prob))

rerf documentation built on May 2, 2019, 8:16 a.m.