ConsensusOPLS {ConsensusOPLS} | R Documentation |
ConsensusOPLS
Description
Constructs the consensus OPLS model with the optimal number of orthogonal components for given data blocks and response, and evaluate the model quality w.r.t other models built with randomly permuted responses.
Usage
ConsensusOPLS(
data,
Y,
maxPcomp = 1,
maxOcomp = 5,
modelType = "da",
nperm = 100,
cvType = "nfold",
nfold = 5,
nMC = 100,
cvFrac = 4/5,
kernelParams = list(type = "p", params = c(order = 1)),
mc.cores = 1,
verbose = FALSE
)
Arguments
data |
A list of data blocks. Each element of the list must be of matrix type. Rows and columns can be identified (names), in which case this will be retained during analysis. Any pre-processing of the data (e.g. scaling) must be carried out before building the model. |
Y |
A vector, factor, dummy matrix or numeric matrix for the response. The type of answer given will condition the model to be used: a numeric vector for linear regression, a factor or dummy matrix for logistic regression or a discriminant model. |
maxPcomp |
Maximum number of Y-predictive components used to build the optimal model. Default, 1. |
maxOcomp |
Maximum number of Y-orthogonal components used to build the optimal model. Default, 5. |
modelType |
String for type of OPLS regression model, either |
nperm |
Number of random permutations desired in response Y. Default, 100. |
cvType |
String for type of cross-validation used. Either |
nfold |
Number of folds performed in n-fold cross-validation. This can be set to the number of samples to perform Leave-One-Out cross validation. Default, 5. |
nMC |
An integer indicating the number of rounds performed when
|
cvFrac |
A numeric value indicating the fraction of observations from
|
kernelParams |
List of parameters for the kernel. Either |
mc.cores |
Number of cores for parallel computing. Default, 1. |
verbose |
A logical indicating if detailed information (cross validation) will be shown. Default, FALSE. |
Value
An object of class ConsensusOPLS
representing the consensus
OPLS model fit.
Examples
data(demo_3_Omics)
datablocks <- lapply(demo_3_Omics[c("MetaboData", "MicroData", "ProteoData")], scale)
res <- ConsensusOPLS(data=datablocks,
Y=demo_3_Omics$Y,
maxPcomp=1, maxOcomp=2,
modelType='da',
nperm=5)
res