PLSDA: PLS-DA

Description Usage Arguments Value Author(s) Examples

View source: R/PLSDA.R

Description

PLS-DA model for multiple classes (2 or more).

Usage

1
2
3
4
5
6
7
8
PLSDA(
  x,
  y,
  nLV = NULL,
  drawRMSEP = TRUE,
  validation = c("CV", "none", "LOO"),
  ...
)

Arguments

x

A numeric matrix of spectral intensities.

y

The real groups' memberships of the samples.

nLV

The number of latent variables for PLS-DA.

drawRMSEP

Logical, if 'TRUE', will draw plot of RMSEP values to decide on the number of latent variables.

validation

The type of validation (see 'pls::plsr()' for more info).

...

Additional arguments to be passed to 'pls::plsr()' (eg: 'segments').

Value

A list with the following elements:

original.dataset

Original matrix of spectral intensities

Y

Dummy matrix representing the classes

nLV

Number of latent variables kept. If NULL, will be set to 3 in the finla model.

RMSEP

Root mean squared error of prediction

R2

Coefficient of multiple determination

Q2

Cross-validated coefficient of multiple determination

Q2cum

Cumulative cross-validated coefficient of multiple determination (over all response variables)

ExpVarY

Proportion of Y variance explained by the model

ExpVarX

Proportion of X variance explained by the model

coefficients

PLSDA coefficients

scores

PLSDA scores

loadings

PLSDA loadings

VIP

The variable VIPs

Author(s)

Manon Martin

Examples

1
2
3
4
5
data('HumanSerum')

PLSDA = PLSDA(x = HumanSerumSpectra,  y = ClassHS, nLV = NULL, drawRMSEP = TRUE, validation = "LOO")

PLSDA = PLSDA(x = HumanSerumSpectra,  y = ClassHS, nLV = NULL, drawRMSEP = TRUE, validation = "CV", segments = 5)

ManonMartin/MBXUCL documentation built on Nov. 26, 2021, 8:45 p.m.