View source: R/aesPC_calculate_AESPCA.R
aespca | R Documentation |
A function to perform adaptive, elastic-net, sparse principal component analysis (AES-PCA).
aespca(X, d = 1, max.iter = 10, eps.conv = 0.001, adaptive = TRUE, para = NULL)
X |
A pathway design matrix: the data matrix should be |
d |
The number of principal components (PCs) to extract from the pathway. Defaults to 1. |
max.iter |
The maximum number of times an internal |
eps.conv |
A numerical convergence threshold for the same |
adaptive |
Internal argument of the |
para |
Internal argument of the |
This function calculates the loadings and reduced-dimension
predictor matrix using both the Singular Value Decomposition and AES-PCA
Decomposition (as described in Efron et al (2003)) of the data matrix.
Note that, if the number of features in the pathway exceeds the number of
samples, this decompostion will be an approximation; also, the internal
lars.lsa
function may require more computing time than usual
to converge (which is one of the reasons why, in practice, we usually
remove pathways that have more than 200-300 features).
See https://web.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf.
For potential enhancement details, see the comment in the "Details"
section of normalize
.
A list of four elements containing the loadings and projected predictors:
aesLoad
: A d \times p
projection matrix of the
d
AES-PCs.
oldLoad
: A d \times p
projection matrix of the
d
PCs from the singular value decomposition (SVD).
aesScore
: An n \times d
predictor matrix: the
original n
observations loaded onto the d
AES-PCs.
oldScore
: An n \times d
predictor matrix: the
original n
observations loaded onto the d
SVD-PCs.
normalize
; lars.lsa
;
ExtractAESPCs
; AESPCA_pVals
# DO NOT CALL THIS FUNCTION DIRECTLY.
# Call this function through AESPCA_pVals() instead.
## Not run:
data("colonSurv_df")
aespca(as.matrix(colonSurv_df[, 5:50]))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.