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

Description Usage Arguments Details Value Author(s) Examples

View source: R/hcppcv.R

Description

Perform the HCP normalization algorithm on a grid of model parameters

Usage

1
2
3
4
hcppcv(Z, Y, X, kRange = c(10, 20), lambdaRange = NULL,
  lambda1Range = NULL, lambda2Range = NULL, lambda3Range = NULL,
  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.

X

vector of responses.

kRange

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

lambdaRange

multiple model parameters

lambda1Range

multiple model parameters

lambda2Range

multiple model parameters

lambda3Range

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
16
## 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
## we do not have response for this data
x <- rnorm(nrol(Y))
##not really meaning full performance function
res <- hcppcv(F, Y, X, kRange, lambdaRange, performance=function(res) sum(res$Res))
res

## End(Not run)

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