get_validation: Select Validation Set for a Matrix

Description Usage Arguments Examples

View source: R/cobra_validate.r

Description

get_validation selects a random sample of matrix indices for regularization parameter selection.

Usage

1
get_validation(p, n, fraction = 0.1, seed = 12345)

Arguments

p

Number of rows

n

Number of columns

fraction

Fraction of entries for hold out

seed

Seed for random number generator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n <- 5
p <- 4
fraction <- 0.1
Theta <- get_validation(p,n,fraction)

M <- matrix(rnorm(n*p),p,n)
YT <- t(M)
YT[Theta$ThetaV] <- NA
Y <- t(YT)
Theta

cvxbiclustr documentation built on May 2, 2019, 9:34 a.m.