spca: An R package to Compute Least Squares Sparse Principal Components
Reviewed by Pith T0 review T1 audit T2 compute T3 formal T4 kernel 2026-06-30 07:55 UTCgrok-4.3pith:3MABZVL7record.jsonopen to challenge →
The pith
The spca R package implements LS-SPCA to produce uncorrelated sparse principal components that maximize explained variance.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
LS-SPCA generates uncorrelated sparse principal components (sPCs) that effectively maximize the explained variance while maintaining strong correlations with standard principal components (PCs). The framework also includes more computationally efficient variants that produce mildly correlated sPCs, which often have lower cardinality while explaining equal or greater variance than the LS-SPCA optimal sPCs.
What carries the argument
The LS-SPCA framework that applies variable selection (simple forward, stepwise forward, or backward elimination) together with stopping rules based on cumulative variance explained or R-squared with the ordinary principal components.
If this is right
- Analysts obtain sparse loadings that remain orthogonal and therefore preserve the additive variance decomposition of ordinary PCA.
- Faster variants trade strict uncorrelatedness for lower cardinality while preserving or increasing explained variance.
- Users can compare multiple spca solutions on the same data and convert foreign SPCA results into the package's object format.
- The C++ engines allow direct application to large tall or fat matrices without custom coding.
Where Pith is reading between the lines
- The same selection logic could be applied to other orthogonal decomposition methods such as canonical correlation analysis to enforce sparsity.
- In settings with many redundant predictors, the uncorrelated constraint may reduce instability when the sparse components are used as regressors in a second stage.
- Simulation studies that plant known sparse structures and measure recovery rates would test whether the stopping rules consistently select the planted variables.
Load-bearing premise
Variable selection procedures paired with variance or R-squared stopping rules will produce sparse components whose claimed uncorrelatedness and variance properties hold on real data without further adjustment.
What would settle it
On a dataset where the sparse components produced by spca explain less total variance than the first k standard principal components or show correlations among themselves above the level allowed by the chosen variant, the performance claims would not hold.
Figures
read the original abstract
This paper introduces the R package spca, which provides a computational framework for least squares sparse principal component analysis (LS-SPCA). Unlike other SPCA methods, LS-SPCA generates uncorrelated sparse principal components (sPCs) that effectively maximize the explained variance while maintaining strong correlations with standard principal components (PCs). The framework also includes more computationally efficient variants that produce mildly correlated sPCs, which often have lower cardinality while explaining equal or greater variance than the LS-SPCA optimal sPCs. The spca package is built on an efficient C++ backend for matrix computations, with distinct engines for tall and fat matrices, and a flexible R frontend. The user interface offers several options for computing sPCs, such as deciding whether sparsification should stop when a threshold for cumulative variance explained or R2 with the PCs is reached, and choosing between simple forward selection, stepwise forward selection, or backward elimination for variable selection. In addition to the print(), summary(), and plot() methods, the package includes tools for comparing different "spca" solutions, grouping sparse loadings, and representing foreign SPCA solutions as "spca" objects. This article demonstrates with real datasets the use of the package in a typical LS-SPCA workflow and briefly contrasts LS-SPCA with conventional SPCA solutions . Then it compares different LS-SPCA solutions obtained from the dataset. Finally, the performance of spca on large tall and fat matrices is discussed, showing that spca offers a computationally efficient alternative for computing interpretable sPCs.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript introduces the R package 'spca' for least-squares sparse principal component analysis (LS-SPCA). It claims that LS-SPCA produces uncorrelated sparse principal components (sPCs) that maximize explained variance while retaining strong correlations with ordinary PCs; it also describes computationally cheaper variants that allow mild correlations and often achieve lower cardinality with equal or greater variance. The package supplies a C++ backend with separate engines for tall and fat matrices, three variable-selection engines (simple forward, stepwise forward, backward elimination), and two stopping rules (cumulative variance or R² threshold). The paper demonstrates typical workflows on real data, compares LS-SPCA solutions, and reports timing results on large matrices.
Significance. If the implemented procedures reliably deliver the stated statistical properties, the package would supply a practical, computationally efficient tool for interpretable sparse PCA in high-dimensional settings. The C++ backend and dual tall/fat engines address a genuine performance gap, and the comparison utilities could facilitate adoption. The work is primarily a software contribution rather than a new methodological derivation.
major comments (2)
- [Abstract / LS-SPCA framework description] Abstract and § on LS-SPCA framework: the central claim that the three variable-selection engines stopped by cumulative-variance or R² thresholds 'generate uncorrelated sparse principal components that effectively maximize the explained variance' is presented without any derivation, orthogonality proof, or guarantee that the selected support preserves exact uncorrelatedness or attains a global variance optimum. The skeptic note correctly identifies this as an unverified assumption; demonstrations on real data alone do not establish the property for arbitrary inputs.
- [Demonstration / performance sections] Demonstration and performance sections: no tables or quantitative results are supplied that report the actual pairwise correlations among the computed sPCs, the difference in explained variance relative to dense PCs, or the cardinality-variance trade-off for the 'mildly correlated' variants on the real datasets used. Without these metrics the reader cannot verify that the advertised properties hold in practice.
minor comments (1)
- [Abstract] The sentence 'Then it compares different LS-SPCA solutions obtained from the dataset' is grammatically incomplete; rephrase for clarity.
Simulated Author's Rebuttal
We thank the referee for the constructive comments on our manuscript describing the spca R package. We address each major comment below.
read point-by-point responses
-
Referee: [Abstract / LS-SPCA framework description] Abstract and § on LS-SPCA framework: the central claim that the three variable-selection engines stopped by cumulative-variance or R² thresholds 'generate uncorrelated sparse principal components that effectively maximize the explained variance' is presented without any derivation, orthogonality proof, or guarantee that the selected support preserves exact uncorrelatedness or attains a global variance optimum. The skeptic note correctly identifies this as an unverified assumption; demonstrations on real data alone do not establish the property for arbitrary inputs.
Authors: The manuscript is a software contribution describing an implementation of the LS-SPCA method. The core statistical properties (uncorrelated sPCs that maximize explained variance) follow from the least-squares formulation in the original LS-SPCA literature; the package simply provides efficient engines to compute them. We acknowledge that the current text does not re-derive these properties or prove that the heuristic variable-selection procedures (forward, stepwise, backward) with early stopping always preserve exact uncorrelatedness or attain a global optimum. We will revise the abstract and framework section to (i) add explicit citations to the methodological papers establishing the LS-SPCA guarantees, (ii) clarify that the three selection engines are heuristics that approximate the optimal support, and (iii) distinguish the exact LS-SPCA solutions from the computationally cheaper mildly-correlated variants. This addresses the concern without misrepresenting the software focus of the paper. revision: yes
-
Referee: [Demonstration / performance sections] Demonstration and performance sections: no tables or quantitative results are supplied that report the actual pairwise correlations among the computed sPCs, the difference in explained variance relative to dense PCs, or the cardinality-variance trade-off for the 'mildly correlated' variants on the real datasets used. Without these metrics the reader cannot verify that the advertised properties hold in practice.
Authors: We agree that the absence of these quantitative metrics limits the reader's ability to verify the claimed properties on the example data. In the revised manuscript we will add tables (and accompanying text) in the demonstration section that report: (a) pairwise correlations among the computed sPCs for each variant, (b) the difference in explained variance relative to the corresponding dense PCs, and (c) the cardinality-variance trade-off curves for both the uncorrelated LS-SPCA solutions and the mildly correlated variants, using the same real datasets already presented. revision: yes
Circularity Check
Software implementation paper with no derivation chain
full rationale
The manuscript describes an R package for LS-SPCA, its user interface, variable-selection engines, and performance on real data. No new mathematical derivations, predictions, or first-principles results are claimed that could reduce to fitted inputs or self-citations. All central statements concern computational functionality and empirical demonstrations rather than tautological reductions. No load-bearing self-citations or ansatzes appear in the provided text.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
J. Camacho and A.K. Smilde and E. Saccenti and J.A. Westerhuis , title =. Chemometrics and Intelligent Laboratory Systems , volume =. 2020 , issn =. doi:https://doi.org/10.1016/j.chemolab.2019.103907 , publisher =
-
[2]
Chemometrics and Intelligent Laboratory Systems , volume=
Camacho, J and Smilde, AK and Saccenti, E and Westerhuis, JA and Bro, Rasmus , title=. Chemometrics and Intelligent Laboratory Systems , volume=. 2021 , publisher=
2021
-
[3]
J. Camacho and A.K. Smilde and E. Saccenti and J.A. Westerhuis and R. Bro , title =. Chemometrics and Intelligent Laboratory Systems , volume =. 2025 , issn =. doi:https://doi.org/10.1016/j.chemolab.2025.105498 , publisher=
-
[4]
, journal =
d'Aspremont, Alexandre and Bach, Francis and Ghaoui, Laurent E. , journal =. Optimal Solutions for Sparse Principal Component Analysis , volume =
-
[5]
Multivariate Behavioral Research , volume =
Carla Ferrara and Francesca Martella and Maurizio Vichi , title =. Multivariate Behavioral Research , volume =. 2019 , publisher =
2019
-
[6]
, journal =
Hotelling, H. , journal =. Analysis of a Complex of Statistical Variables with Principal Components , volume =
-
[7]
Annals of Statistics , volume =
Johnstone, Iain , title =. Annals of Statistics , volume =. 2001 , doi =
2001
-
[8]
Australia & New Zealand Journal of Statistics , year =
Merola, Giovanni Maria , title =. Australia & New Zealand Journal of Statistics , year =
-
[9]
Projection sparse principal component analysis: An efficient least squares method
Merola, Giovanni Maria and Chen, Gemai. Projection sparse principal component analysis: An efficient least squares method. Journal of Multivariate Analysis. 2019
2019
-
[10]
Journal of Applied Statistics , volume=
SIMPCA: a framework for rotating and sparsifying principal components , author=. Journal of Applied Statistics , volume=. 2020 , publisher=
2020
-
[11]
Merola, Giovanni M. , title =. 2026 , version =. doi:10.5281/zenodo.18829364 , url =
-
[12]
and Weiss, Y
Moghaddam, B. and Weiss, Y. and Avidan, S. , title =. Advances in Neural Information Processing Systems , year =
-
[13]
, year =
Pearson, K. , year =. Philosophical Magazine , volume =
-
[14]
2025 , url =
R: A Language and Environment for Statistical Computing , author =. 2025 , url =
2025
-
[15]
and Jolliffe, I
Trendafilov, N. and Jolliffe, I. , title =. Computational Statistics and Data Analysis , volume =. 2006 , pages =
2006
-
[16]
Ninth interface symposium computer science and statistics , pages=
Probability plotting points for principal components , author=. Ninth interface symposium computer science and statistics , pages=. 1976 , organization=
1976
-
[17]
2021 , month =
Winkler, Anderson Marcelo , title =. 2021 , month =
2021
-
[18]
and Hastie, T
Zou, H. and Hastie, T. and Tibshirani, R. , title =. Journal of Computational and Graphical Statistics , volume =
-
[19]
Proceedings of the IEEE , volume=
Zou, Hui and Xue, Lingzhou , title=. Proceedings of the IEEE , volume=. 2018 , publisher=
2018
-
[20]
Journal of Machine Learning Research , year =
abess: A Fast Best Subset Selection Library in Python and R , author =. Journal of Machine Learning Research , year =
-
[21]
abess: Fast Best Subset Selection , author =. 2025 , note =. doi:10.32614/CRAN.package.abess , url =
-
[22]
and Swineford, Frances , title =
Holzinger, Karl J. and Swineford, Frances , title =. 1939 , series =
1939
-
[23]
Raw data from online personality tests , year =
-
[24]
2024 , note =
plsgenomics: PLS Analyses for Genomics , author =. 2024 , note =
2024
-
[25]
2025 , note =
Revelle, William , title =. 2025 , note =
2025
-
[26]
2020 , note =
elasticnet: Elastic-Net for Sparse Estimation and Sparse PCA , author =. 2020 , note =
2020
-
[27]
2026 , note =
pls: Partial Least Squares and Principal Component Regression , author =. 2026 , note =
2026
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.