| ComDim_OPLS | R Documentation |
Finding common dimensions in multi-block datasets using OPLS. Also known as ConsensusOPLS (ComDim-OPLS) for multiblock structures: orthogonal components uncorrelated with Y are extracted from all blocks simultaneously before the predictive components are computed.
ComDim_OPLS(
MB = MB,
y = y,
ndim = 1,
nort = 1,
method = c("OPLS-DA", "OPLS-R"),
decisionRule = c("fixed", "max")[2],
normalise = FALSE,
loquace = FALSE,
cv.k = 7
)
MB |
A MultiBlock object. |
y |
The Y-block. A class vector or dummy matrix for OPLS-DA, or a numeric matrix/vector for OPLS-R. |
ndim |
Number of predictive Common Dimensions. Default is 1. |
nort |
Maximum number of orthogonal Common Dimensions. Default is 1. The actual number used is determined by ConsensusOPLS cross-validation and may be less than this value. |
method |
'OPLS-DA' for discriminant analysis or 'OPLS-R' for regression. |
decisionRule |
Only used if method is 'OPLS-DA'. If 'fixed', samples are assigned to the class with Y-hat above 1/nclasses. If 'max', samples are assigned to the class with the highest Y-hat. |
normalise |
To apply block normalisation. FALSE == no (default), TRUE == yes. |
loquace |
To display the calculation times. TRUE == yes, FALSE == no (default). |
cv.k |
Number of folds for k-fold cross-validation (default 7). Set
to 0 to skip CV output. ConsensusOPLS always performs internal CV to select
the optimal number of orthogonal components; when |
This function is a wrapper around ConsensusOPLS.
The core kernel-OPLS extraction is delegated to that package; all ComDim
output slots (local scores, loadings, VIP, sensitivity, confusion matrix,
etc.) are computed from the returned model objects.
A ComDim object. All slots are populated. Key slots:
Method"OPLS-DA" or "OPLS-R".
ndimNumber of predictive Common Dimensions.
Q.scoresPredictive global scores matrix (n \times ndim).
T.scoresNamed list of block-specific predictive local scores.
P.loadingsGlobal predictive loadings.
SaliencesPredictive block salience matrix (ntable \times ndim).
OrthogonalList with orthogonal component outputs: nort,
Q.scores, T.scores, P.loadings.ort, Saliences.ort.
R2XNamed vector (length ndim + nort) of X-variance fractions.
R2YNamed vector (length ndim + nort) of Y-variance fractions.
Q2Cross-validated Q2 per class/response (when cv.k >= 2;
otherwise training-set fit).
DQ2(OPLS-DA only) Cross-validated discriminant Q2 per class.
VIPGlobal total VIP (named vector, length p_{tot}).
VIP.blockNamed list (one data.frame per block) with columns
p, o, tot.
PLS.modelKOPLS regression objects: W, B, B0, Y.
cvCross-validation results when cv.k >= 2: k,
Ypred, Q2, DQ2.
PredictionTraining-set predictions: Y.pred; for OPLS-DA
also decisionRule, trueClass, predClass,
Sensitivity, Specificity, confusionMatrix.
MeanList with MeanMB and MeanY.
NormList with NormMB, FrobNorms, RVweights.
variable.blockBlock membership of each variable.
runtimeTotal computation time in seconds.
Boccard J, Rutledge DN (2013). A consensus OPLS-DA strategy for multiblock Omics data fusion. Analytica Chimica Acta, 769, 30–39. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.aca.2013.01.022")}
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
y <- rep(c("A", "B"), 5)
results <- ComDim_OPLS(mb, y, ndim = 1, nort = 1, method = "OPLS-DA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.