hcpcv: Perform the HCP normalization algorithm on a grid of model...

Description Usage Arguments Details Value Author(s) Examples

View source: R/hcpcv.R

Description

Perform the HCP normalization algorithm on a grid of model parameters

Usage

1
2
3
hcpcv(Z, Y, kRange = c(10, 20), lambdaRange = c(1, 5, 10, 20),
  performance = NULL, iter = 100, stand = TRUE, log = TRUE,
  verbose = TRUE, fast = TRUE)

Arguments

Z

a matrix nxd of known covariates, where n is the number of subjects and d is the number of known covariates. *must be standardize (columns have 0 mean and constant SS).

Y

a matrix of nxg of expression data (must be standardized (columns scaled to have constant SS and mean 0). ** use standardize function to standardize F and Y.

kRange

multiple numbers of inferred hidden components (k is an integer)

lambdaRange

multiple model parameters

performance

function accepting res with res$Res the transformed Residuals

iter

(optional) iter: number of iterations (default = 100);

stand

default standardize data TRUE

log

default log-transformation TRUE

verbose

default TRUE

fast

default use fast RcppArmadillo implementation

Details

This function can be used to find the optimal model parameters with a used-defined performance function

Value

vector of performance measures with names indicating the model parameter

Author(s)

mvaniterson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(BiocParallel)
library(Rhcpp)
register(MulticoreParam(3))
kRange <- c(10, 20)
lambdaRange <- c(1, 5, 10, 20)
data(rhcppdata)
F <- rhcppdata$F
Y <- rhcppdata$Y
##not really meaning full performance function
res <- hcppcv(Z, Y, kRange, lambdaRange, performance=function(res) sum(res$Res))
hist(res)
which.min(res)

## End(Not run)

mvaniterson/Rhcpp documentation built on Feb. 24, 2020, 4:06 p.m.