lol.project.pls: Partial Least-Squares (PLS)

Description Usage Arguments Value Details Author(s) Examples

View source: R/plsda.R

Description

A function for implementing the Partial Least-Squares (PLS) Algorithm.

Usage

1
lol.project.pls(X, Y, r, ...)

Arguments

X

[n, d] the data with n samples in d dimensions.

Y

[n] the labels of the samples with K unique labels.

r

the rank of the projection.

...

trailing args.

Value

A list containing the following:

A

[d, r] the projection matrix from d to r dimensions.

ylabs

[K] vector containing the K unique, ordered class labels.

centroids

[K, d] centroid matrix of the K unique, ordered classes in native d dimensions.

priors

[K] vector containing the K prior probabilities for the unique, ordered classes.

Xr

[n, r] the n data points in reduced dimensionality r.

cr

[K, r] the K centroids in reduced dimensionality r.

Details

For more details see the help vignette: vignette("pls", package = "lolR")

Author(s)

Eric Bridgeford

Examples

1
2
3
4
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.project.pls(X=X, Y=Y, r=5)  # use pls to project into 5 dimensions

neurodata/lol documentation built on March 3, 2021, 1:46 a.m.