Description Usage Arguments Details Value Author(s) Examples
Perform the HCP normalization algorithm on a grid of model parameters
1 2 3 |
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 |
This function can be used to find the optimal model parameters with a used-defined performance function
vector of performance measures with names indicating the model parameter
mvaniterson
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.