spcaWrapper {scPCA}R Documentation

Sparse PCA Wrapper

Description

This wrapper function specifies which implementation of sparse pricincipal component analysis (SPCA) is used to sparsify the loadings of the contrastive covariance matrix. Currently, the scPCA package supports the iterative algorithm detailed by Zou H, Hastie T, Tibshirani R (2006). “Sparse principal component analysis.” Journal of computational and graphical statistics, 15(2), 265–286., and Erichson NB, Zeng P, Manohar K, Brunton SL, Kutz JN, Aravkin AY (2018). “Sparse Principal Component Analysis via Variable Projection.” ArXiv, abs/1804.00341.'s randomized and non-randomized versions of SPCA solved via variable projection. These methods are implemented in the elasticnet and sparsepca packages.

Usage

spcaWrapper(alg, contrast_cov, k, penalty)

Arguments

alg

A character indicating the SPCA algorithm used to sparsify the contrastive loadings. Currently supports iterative for the Zou H, Hastie T, Tibshirani R (2006). “Sparse principal component analysis.” Journal of computational and graphical statistics, 15(2), 265–286. implemententation, var_proj for the non-randomized Erichson NB, Zeng P, Manohar K, Brunton SL, Kutz JN, Aravkin AY (2018). “Sparse Principal Component Analysis via Variable Projection.” ArXiv, abs/1804.00341. solution, and rand_var_proj for the randomized Erichson NB, Zeng P, Manohar K, Brunton SL, Kutz JN, Aravkin AY (2018). “Sparse Principal Component Analysis via Variable Projection.” ArXiv, abs/1804.00341. result.

contrast_cov

A contrastive covariance matrix.

k

A numeric indicating the number of eigenvectors (or sparse contrastive components) to be computed.

penalty

A numeric indicating the L1 penalty parameter applied to the loadings.

Value

A p x k sparse loadings matrix, where p is the number of features, and k is the number of sparse contrastive components.


[Package scPCA version 1.2.0 Index]