PLSc: PLS classification

View source: R/PLSc.R

PLScR Documentation

PLS classification

Description

Performs Partial Least Squares classification

Usage

PLSc(X, Y, A, scaling = 'auto-scaling', post.transformation = TRUE,
eps = 0.01, Y.prob = FALSE, transformation = 'ilr')

Arguments

X

Data matrix where columns represent the p variables and rows the n observations.

Y

Data matrix where columns represent the two classes and rows the n observations.

A

Number of score components

scaling

Type of scaling, one of c('auto-scaling', 'pareto-scaling', 'mean-centering'). Default to 'auto-scaling'

post.transformation

Boolean value. TRUE if you want to apply post transformation. Default TRUE

eps

Default 0.01. eps is used when Y.prob = FALSE to transform Y in a probability vector

Y.prob

Boolean value. Default FALSE. IF TRUE Y is a probability vector

transformation

Transformation used to map Y in probability data vector. The options are 'ilr' and 'clr'. Default @ilr.

Value

List with the following objects:

W

Matrix of weights

X_loading

Matrix of X loading

Y_loading

Matrix of Y loading

X

Matrix of X data (predictor variables)

Y

Matrix of Y data (dependent variable)

T_score

Matrix of scores

Y_fitted

Fitted Y matrix

B

Matrix regression coefficients

M

Number of orthogonal components if post.transformation=TRUE is applied.

Author(s)

Angela Andreella

References

Stocchero, M., De Nardi, M., & Scarpa, B. (2021). PLS for classification. Chemometrics and Intelligent Laboratory Systems, 216, 104374.

Examples

datas <- simulatePilotData(nvar = 30, clus.size = c(5,5),m = 6,nvar_rel = 5,A = 2)
out <- PLSc(X = datas$X, Y = datas$Y, A = 3)


powerPLS documentation built on April 4, 2025, 1:57 a.m.