do.opls | R Documentation |
Also known as multilinear regression or semipenalized CCA, Orthogonal Partial Least Squares (OPLS)
was first used to perform multilinear ordinary least squares. In its usage, unlike PLS or CCA,
OPLS does not rely on projected variance of response -or, data2
. Instead, it exploits projected
variance of input - covariance of data1
and relates it under cross-covariance setting. Therefore,
OPLS only returns projection information of data1
, just like any other unsupervised methods in our package.
do.opls(data1, data2, ndim = 2)
data1 |
an (n\times N) data matrix whose rows are observations. |
data2 |
an (n\times M) data matrix whose rows are observations. |
ndim |
an integer-valued target dimension. |
a named list containing
an (n\times ndim) matrix of projected observations from data1
.
an (N\times ndim) whose columns are loadings for data1
.
a list containing information for out-of-sample prediction for data1
.
a vector of eigenvalues for iterative decomposition.
Kisung You
barker_partial_2003Rdimtools
do.pls
## generate 2 normal data matrices mat1 = matrix(rnorm(100*12),nrow=100)+10 # 12-dim normal mat2 = matrix(rnorm(100*6), nrow=100)-10 # 6-dim normal ## compare OPLS and PLS res_opls = do.opls(mat1, mat2, ndim=2) res_pls = do.pls(mat1, mat2, ndim=2) ## visualize opar <- par(no.readonly=TRUE) par(mfrow=c(1,2)) plot(res_opls$Y, cex=0.5, main="OPLS result") plot(res_pls$Y1, cex=0.5, main="PLS result") par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.