sparsepca: Sparse Principal Component Analysis

Fits principal components with sparse loading vectors for interpretable dimension reduction. Variable projection combines an orthogonal reconstruction factor with elastic net or cardinality regularization of the loadings. Deterministic, randomized, and robust algorithms support exploratory analysis of high-dimensional data; the randomized algorithm also supports sparse input matrices through implicit centering and scaling. A robust formulation separates entrywise outliers from the low-rank reconstruction. Regularization paths and approximate feature-count searches reuse matrix factorizations, and prediction applies the fitted transformation to new observations. The methods are described in Erichson et al. (2020) <doi:10.1137/18M1211350>.

Package details

AuthorN. Benjamin Erichson [aut, cre], Peng Zheng [aut], Sasha Aravkin [aut], Maria A. Sans-Fuentes [ctb] (ORCID: <https://orcid.org/0000-0002-6402-9211>, Reported the robust objective error)
MaintainerN. Benjamin Erichson <erichson@icsi.berkeley.edu>
LicenseGPL (>= 3)
Version1.0.0
URL https://github.com/erichson/spca 
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("sparsepca")

Try the sparsepca package in your browser

Any scripts or data that you put into this service are public.

sparsepca documentation built on Nov. 6, 2026, 5:06 p.m.