msPCA: An R Package for Sparse PCA with Multiple Components
For practitioners needing interpretable PCA, this package offers a practical tool with competitive performance, though it is an incremental contribution.
The paper presents msPCA, an R package for sparse PCA that generates multiple non-redundant sparse loading vectors, achieving competitive runtimes on problems with thousands of features while maintaining high variance explained and controlled feasibility violations.
We present msPCA: an open-source R package for sparse principal component analysis with multiple components. It implements an alternating maximization algorithm to generate a set of sparse loading vectors that collectively explain a large fraction of the variance in a dataset, while remaining non-redundant. The algorithm supports two definitions of non-redundancy: either orthogonality of the loading vectors or zero pairwise correlation between principal components (PCs). In the reported benchmarks, msPCA solves sparse PCA problems with thousands of features, achieving competitive runtimes while producing sparse components with controlled feasibility violations and a high fraction of variance explained.