OPLS-methods {Cardinal}R Documentation

Orthogonal Partial Least Squares

Description

Performs orthogonal partial least squares (also called orthogonal projection to latent structures or O-PLS) on an imaging dataset. This will also perform discriminant analysis (O-PLS-DA) if the response is a factor.

Usage

## S4 method for signature 'SImageSet,matrix'
OPLS(x, y, ncomp = 20,
    method = "nipals",
    center = TRUE,
    scale = FALSE,
    keep.Xnew = TRUE,
    iter.max = 100, ...)

## S4 method for signature 'SImageSet,numeric'
OPLS(x, y, ...)

## S4 method for signature 'SImageSet,factor'
OPLS(x, y, ...)

## S4 method for signature 'SImageSet,character'
OPLS(x, y, ...)

## S4 method for signature 'OPLS'
predict(object, newx, newy, keep.Xnew = TRUE, ...)

Arguments

x

The imaging dataset on which to perform partial least squares.

y

The response variable, which can be a matrix or a vector for ordinary O-PLS, or a factor or a character for O-PLS-DA.

ncomp

The number of O-PLS components to calculate.

method

The function used to calculate the projection.

center

Should the data be centered first? This is passed to scale.

scale

Shoud the data be scaled first? This is passed to scale.

keep.Xnew

Should the new data matrix be kept after filtering out the orthogonal variation?

iter.max

The number of iterations to perform for the NIPALS algorithm.

...

Passed to the next OPLS method.

object

The result of a previous call to OPLS.

newx

An imaging dataset for which to calculate their OPLS projection and predict a response from an already-calculated OPLS object.

newy

Optionally, a new response from which residuals should be calculated.

Value

An object of class OPLS, which is a ResultSet, where each component of the resultData slot contains at least the following components:

Xnew:

A new data matrix that has been filtered of the orthogonal variation.

Xortho:

A new data matrix that consists of only the orthogonal variation.

Oscores:

A matrix with the orthogonal component scores for the explanatary variable.

Oloadings:

A matrix objects with the orthogonal explanatory variable loadings.

Oweights:

A matrix with the orthgonal explanatory variable weights.

scores:

A matrix with the component scores for the explanatary variable.

loadings:

A matrix with the explanatory variable loadings.

weights:

A matrix with the explanatory variable weights.

Yscores:

A matrix objects with the component scores for the response variable.

Yweights:

A matrix objects with the response variable weights.

projection:

The projection matrix.

coefficients:

The matrix of the regression coefficients.

ncomp:

The number of O-PLS components.

method:

The method used to calculate the projection.

center:

The center of the dataset. Used for calculating O-PLS scores on new data.

scale:

The scaling factors for the dataset. Used for O-PLS scores on new data.

Ycenter:

The centers of the response variables. Used for predicting new observations.

Yscale:

The scaling factors for the response variables. Used for predicting new observation.

fitted:

The fitted response.

Author(s)

Kylie A. Bemis

References

Trygg, J., & Wold, S. (2002). Orthogonal projections to latent structures (O-PLS). Journal of Chemometrics, 16(3), 119-128. doi:10.1002/cem.695

See Also

PLS, PCA, spatialShrunkenCentroids,

Examples

sset <- generateImage(diag(4), range=c(200, 300), step=1)

y <- factor(diag(4))

opls <- OPLS(sset, y, ncomp=1:2)

[Package Cardinal version 1.12.1 Index]