# lol.project.pls: Partial Least-Squares (PLS) In lolR: Linear Optimal Low-Rank Projection

## 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")`

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 ```

### Example output

```Registered S3 methods overwritten by 'robust':
method              from
plot.covfm          fit.models
print.covfm         fit.models
summary.covfm       fit.models
print.summary.covfm fit.models
rlm is already registered in the fit.models registry
covfm is already registered in the fit.models registry
```

lolR documentation built on July 8, 2020, 7:35 p.m.