lol.project.lol {lolR} | R Documentation |
Linear Optimal Low-Rank Projection (LOL)
Description
A function for implementing the Linear Optimal Low-Rank Projection (LOL) Algorithm. This algorithm allows users to find an optimal projection from 'd' to 'r' dimensions, where 'r << d', by combining information from the first and second moments in thet data.
Usage
lol.project.lol(
X,
Y,
r,
second.moment.xfm = FALSE,
second.moment.xfm.opts = list(),
first.moment = "delta",
second.moment = "linear",
orthogonalize = FALSE,
robust = FALSE,
...
)
Arguments
X |
|
Y |
|
r |
the rank of the projection. Note that |
second.moment.xfm |
whether to use extraneous options in estimation of the second moment component. The transforms specified should be a numbered list of transforms you wish to apply, and will be applied in accordance with |
second.moment.xfm.opts |
optional arguments to pass to the |
first.moment |
the function to capture the first moment. Defaults to
|
second.moment |
the function to capture the second moment. Defaults to
|
orthogonalize |
whether to orthogonalize the projection matrix. Defaults to |
robust |
whether to perform PCA on a robust estimate of the covariance matrix or not. Defaults to |
... |
trailing args. |
Value
A list containing the following:
A |
|
ylabs |
|
centroids |
|
priors |
|
Xr |
|
cr |
|
second.moment |
the method used to estimate the second moment. |
first.moment |
the method used to estimate the first moment. |
Details
For more details see the help vignette:
vignette("lol", package = "lolR")
Author(s)
Eric Bridgeford
References
Joshua T. Vogelstein, et al. "Supervised Dimensionality Reduction for Big Data" arXiv (2020).
Examples
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30) # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.project.lol(X=X, Y=Y, r=5) # use lol to project into 5 dimensions
# use lol to project into 5 dimensions, and produce an orthogonal basis for the projection matrix
model <- lol.project.lol(X=X, Y=Y, r=5, orthogonalize=TRUE)
# use LRQDA to estimate the second moment by performing PCA on each class
model <- lol.project.lol(X=X, Y=Y, r=5, second.moment='quadratic')
# use PLS to estimate the second moment
model <- lol.project.lol(X=X, Y=Y, r=5, second.moment='pls')
# use LRLDA to estimate the second moment, and apply a unit transformation
# (according to scale function) with no centering
model <- lol.project.lol(X=X, Y=Y, r=5, second.moment='linear', second.moment.xfm='unit',
second.moment.xfm.opts=list(center=FALSE))