tpowerPCACV | R Documentation |
Sparsity parameter selection for PCA-based TPower using the cross-validation
approach of Witten et al. as implemented by the SPC.cv
method in the PMA package.
tpowerPCACV(X, k.values, nfolds=5)
X |
n-by-p data matrix being evaluated via PCA. |
k.values |
Set of truncation parameter values to evaluate via cross-validation. Values must be between 1 and p. |
nfolds |
Number of folds for cross-validation |
k value that generated the smallest cross-validation error.
Yuan, X.-T. and Zhang, T. (2013). Truncated power method for sparse eigenvalue problems. J. Mach. Learn. Res., 14(1), 899-925.
Witten, D. M., Tibshirani, R., and Hastie, T. (2009). A penalized matrix decomposition, with applications to sparse principal components and canonical correlation analysis. Biostatistics, 10(3), 515-534.
tpower
,PMA{SPC.cv}
set.seed(1) # Simulate 10x5 MVN data matrix X=matrix(rnorm(50), nrow=10) # Generate range of k values to evaluate k.values = 1:5 # Use 5-fold cross-validation to estimate optimal k value tpowerPCACV(X=X, k.values=k.values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.