Title: | Supervised Dimensional Reduction by Guided Partial Least Squares |
---|---|
Description: | Guided partial least squares (guided-PLS) is the combination of partial least squares by singular value decomposition (PLS-SVD) and guided principal component analysis (guided-PCA). For the details of the methods, see the reference section of GitHub README.md <https://github.com/rikenbit/guidedPLS>. |
Authors: | Koki Tsuyuzaki [aut, cre] |
Maintainer: | Koki Tsuyuzaki <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.99.0 |
Built: | 2025-02-09 04:14:39 UTC |
Source: | https://github.com/rikenbit/guidedpls |
Guided partial least squares (guided-PLS) is the combination of partial least squares by singular value decomposition (PLS-SVD) and guided principal component analysis (guided-PCA). For the details of the methods, see the reference section of GitHub README.md <https://github.com/rikenbit/guidedPLS>.
The DESCRIPTION file:
Package: | guidedPLS |
Type: | Package |
Title: | Supervised Dimensional Reduction by Guided Partial Least Squares |
Version: | 0.99.0 |
Authors@R: | c(person("Koki", "Tsuyuzaki", role = c("aut", "cre"), email = "[email protected]")) |
Depends: | R (>= 3.4.0) |
Imports: | irlba |
Suggests: | fields, knitr, rmarkdown, testthat |
Description: | Guided partial least squares (guided-PLS) is the combination of partial least squares by singular value decomposition (PLS-SVD) and guided principal component analysis (guided-PCA). For the details of the methods, see the reference section of GitHub README.md <https://github.com/rikenbit/guidedPLS>. |
License: | MIT + file LICENSE |
URL: | https://github.com/rikenbit/guidedPLS |
VignetteBuilder: | knitr |
Repository: | https://rikenbit.r-universe.dev |
RemoteUrl: | https://github.com/rikenbit/guidedpls |
RemoteRef: | HEAD |
RemoteSha: | a0875b7772a54fa7d8eed2df2d98691f6344d098 |
Author: | Koki Tsuyuzaki [aut, cre] |
Maintainer: | Koki Tsuyuzaki <[email protected]> |
Index of help topics:
PLSSVD Partial Least Squares by Singular Value Decomposition (PLS-SVD) dummyMatrix Toy model data for using dNMF, dSVD, dsiNMF, djNMF, dPLS, dNTF, and dNTD guidedPLS Guided Partial Least Squares (guied-PLS) guidedPLS-package Supervised Dimensional Reduction by Guided Partial Least Squares sPLSDA Sparse Partial Least Squares Discriminant Analysis (sPLS-DA) softThr Soft-thresholding to make a sparse vector sparse toyModel Toy model data for using PLSSVD, sPLSDA, and guidedPLS
Koki Tsuyuzaki [aut, cre]
Maintainer: Koki Tsuyuzaki <[email protected]>
Le Cao, et al. (2008). A Sparse PLS for Variable Selection when Integrating Omics Data. Statistical Applications in Genetics and Molecular Biology, 7(1)
Reese S E, et al. (2013). A new statistic for identifying batch effects in high-throughput genomic data that uses guided principal component analysis. Bioinformatics, 29(22), 2877-2883
toyModel
,PLSSVD
,sPLSDA
,guidedPLS
ls("package:guidedPLS")
ls("package:guidedPLS")
A label vector is converted to a dummy matrix.
dummyMatrix(y, center=TRUE)
dummyMatrix(y, center=TRUE)
y |
A label vector to specify the group of data. |
center |
An option to center the rows of matrix (Default: TRUE). |
A matrix is generated. The number of row is equal to the length of y and the number of columns is the number of unique elements of y.
Koki Tsuyuzaki
y <- c(1, 3, 2, 1, 4, 2) dummyMatrix(y)
y <- c(1, 3, 2, 1, 4, 2) dummyMatrix(y)
Four matrices X1, X2, Y1, and Y2 are required. X1 and Y1 are supposed to share the rows, X2 and Y2 are supposed to share the rows, and Y1 and Y2 are supposed to share the columns.
guidedPLS(X1, X2, Y1, Y2, k=.minDim(X1, X2, Y1, Y2), cortest=FALSE, fullrank=TRUE, verbose=FALSE)
guidedPLS(X1, X2, Y1, Y2, k=.minDim(X1, X2, Y1, Y2), cortest=FALSE, fullrank=TRUE, verbose=FALSE)
X1 |
The input matrix which has N-rows and M-columns. |
Y1 |
The input matrix which has N-rows and L-columns. |
X2 |
The input matrix which has O-rows and P-columns. |
Y2 |
The input matrix which has O-rows and L-columns. |
k |
The number of low-dimension (k < N, M, L, O, Default: .minDim(X1, X2, Y1, Y2)) |
cortest |
If cortest is set as TRUE, t-test of correlation coefficient is performed (Default: FALSE) |
fullrank |
If fullrank is set as TRUE, irlba is used, otherwise fullrank SVD is used (Default: TRUE) |
verbose |
Verbose option (Default: FALSE) |
res: object of svd() loadingYX1: Loading vector to project X1 to lower dimension via Y1 (M times k). loadingYX2: Loading vector to project X2 to lower dimension via Y2 (P times k). scoreX1: Projected X1 (N times k) scoreX2: Projected X2 (O times k) scoreYX1: Projected YX1 (L times k) scoreYX2: Projected YX2 (L times k) corYX1: Correlation Coefficient (Default: NULL) corYX2: Correlation Coefficient (Default: NULL) pvalYX1: P-value vector of corYX1 (Default: NULL) pvalYX2: P-value vector of corYX2 (Default: NULL) qvalYX1: Q-value vector of BH method against pvalYX1 (Default: NULL) qvalYX2: Q-value vector of BH method against pvalYX2 (Default: NULL)
Koki Tsuyuzaki
Le Cao, et al. (2008). A Sparse PLS for Variable Selection when Integrating Omics Data. Statistical Applications in Genetics and Molecular Biology, 7(1)
Reese S E, et al. (2013). A new statistic for identifying batch effects in high-throughput genomic data that uses guided principal component analysis. Bioinformatics, 29(22), 2877-2883
# Test data data <- toyModel() # Simple usage out <- guidedPLS(X1=data$X1, X2=data$X2, Y1=data$Y1, Y2=data$Y2, k=4)
# Test data data <- toyModel() # Simple usage out <- guidedPLS(X1=data$X1, X2=data$X2, Y1=data$Y1, Y2=data$Y2, k=4)
Two matrices X and Y sharing a row are required
PLSSVD(X, Y, k=.minDim(X, Y), deflation=FALSE, fullrank=TRUE, verbose=FALSE)
PLSSVD(X, Y, k=.minDim(X, Y), deflation=FALSE, fullrank=TRUE, verbose=FALSE)
X |
The input matrix which has N-rows and M-columns. |
Y |
The input matrix which has N-rows and L-columns. |
k |
The number of low-dimension (k < N, M, L, Default: .minDim(X, Y)) |
deflation |
If deflation is set as TRUE, the score vectors are made orthogonal, otherwise the loading vectors are made orthogonal (Default: FALSE) |
fullrank |
If fullrank is set as TRUE, irlba is used, otherwise fullrank SVD is used (Default: TRUE) |
verbose |
Verbose option (Default: FALSE) |
scoreX : Score matrix which has M-rows and K-columns. loadingX : Loading matrix which has N-rows and K-columns. scoreY : Score matrix which has L-rows and K-columns. loadingY : Loading matrix which has N-rows and K-columns. d : K-length singular value vector of the cross-product matrix X'Y.
Koki Tsuyuzaki
Le Cao, et al. (2008). A Sparse PLS for Variable Selection when Integrating Omics Data. Statistical Applications in Genetics and Molecular Biology, 7(1)
# Test data data <- toyModel() # Simple usage out <- PLSSVD(X=data$X1, Y=data$Y1, k=4)
# Test data data <- toyModel() # Simple usage out <- PLSSVD(X=data$X1, Y=data$Y1, k=4)
The degree of the sparseness of vector is controlled by the lambda parameter.
softThr(y, lambda=1)
softThr(y, lambda=1)
y |
A numerical vector. |
lambda |
Threshold value to convert a value 0. If the absolute value of an element of vector is less than lambda, the value is converted to 0 (Default: 1). |
A numerical vector, whose length is the same as that of y.
Koki Tsuyuzaki
y <- seq(-2, 2, 0.1) softThr(y)
y <- seq(-2, 2, 0.1) softThr(y)
Two matrices X and Y sharing a row are required
sPLSDA(X, Y, k=.minDim(X, Y), lambda=1, thr=1e-10, fullrank=TRUE, num.iter=10, verbose=FALSE)
sPLSDA(X, Y, k=.minDim(X, Y), lambda=1, thr=1e-10, fullrank=TRUE, num.iter=10, verbose=FALSE)
X |
The input matrix which has N-rows and M-columns. |
Y |
The input matrix which has N-rows and L-columns. |
k |
The number of low-dimension (k < N, M, L, Default: .minDim(X, Y)) |
lambda |
Penalty parameter to control the sparseness of u and v. The larger the value, the sparser the solution (Default: 1). |
thr |
Threshold to stop the iteration (Default: 1e-10). |
fullrank |
If fullrank is set as TRUE, irlba is used, otherwise fullrank SVD is used (Default: TRUE) |
num.iter |
The number of iterations in each rank (Default: 10) |
verbose |
Verbose option (Default: FALSE) |
scoreX : Score matrix which has M-rows and K-columns. loadingX : Loading matrix which has N-rows and K-columns. scoreY : Score matrix which has L-rows and K-columns. loadingY : Loading matrix which has N-rows and K-columns. d : K-length singular value vector of the cross-product matrix X'Y.
Koki Tsuyuzaki
Le Cao, et al. (2008). A Sparse PLS for Variable Selection when Integrating Omics Data. Statistical Applications in Genetics and Molecular Biology, 7(1)
# Test data data <- toyModel() # Simple usage out <- sPLSDA(X=data$X1, Y=data$Y1, k=4)
# Test data data <- toyModel() # Simple usage out <- sPLSDA(X=data$X1, Y=data$Y1, k=4)
The data is used for confirming the algorithm are properly working.
toyModel(model="Easy", seeds=123)
toyModel(model="Easy", seeds=123)
model |
"Easy" and "Hard" are available (Default: "Easy"). |
seeds |
Random number for setting set.seeds in the function (Default: 123). |
A list object containing a set of matrices X1, X2, Y1, Y1_dummy, Y2, Y1_dummy.
Koki Tsuyuzaki
data <- toyModel(seeds=123)
data <- toyModel(seeds=123)