R package for supervised dimensional reduction by guided partial least squares
======
git clone https://github.com/rikenbit/guidedPLS/
R CMD INSTALL guidedPLS
or type the code below in the R console window
library(devtools)
devtools::install_github("rikenbit/guidedPLS")
guidedPLS() accepts Matrix::dgCMatrix (sparse matrices) for X1 and X2.
This is particularly useful for single-cell data (scRNA-seq, scATAC-seq) where feature matrices are large and sparse.
Internally, the row-centered cross-product is computed without materializing the dense centered matrix, using the identity:
X_centered %*% Y = X %*% Y - mu * (1^T Y)
where mu is the vector of row means and 1^T Y = colSums(Y).
Only the small k x p result matrix is dense, keeping memory usage proportional to the number of non-zero entries.
======
If you have suggestions for how guidedPLS could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.