spcaWrapper: Sparse PCA Wrapper

Description Usage Arguments Value

View source: R/spcaWrapper.R

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 \insertRefzou2006sparsescPCA, and \insertReferichson2018sparsescPCA's randomized and non-randomized versions of SPCA solved via variable projection. These methods are implemented in the elasticnet and sparsepca packages.

Usage

1
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 \insertRefzou2006sparsescPCA implemententation, var_proj for the non-randomized \insertReferichson2018sparsescPCA solution, and rand_var_proj for the randomized \insertReferichson2018sparsescPCA 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.


scPCA documentation built on April 29, 2020, 5:18 a.m.