Changelog
Source:NEWS.md
msPCA 0.5.1
-
mspca()now recordsfeasibilityConstraintTypeandnonredundancyin the returned object.nonredundancyholds two r x r matrices,orthogonality() anduncorrelatedness(). -
summary.mspca()now displays thefeasibilityConstraintTypeused at fitting and the feasibility violation matrix innonredundancyinstead of recomputing them. Its printed output now names the constraint definition in use and points to the stored matrices for the other one. - New weighting rule for the per-component penalty weights to unify both constraint types and improve convergence.
- Uncorrelatedness violations are now normalized by the total variance
tr(Sigma), i.e. the pairwise term is|u_t' Sigma u_s| / tr(Sigma). The normalized measure is now invariant to a rescaling ofSigma. This affectsmspca(..., feasibilityConstraintType = 1)(thefeasibility_violationfield, the stopping rule, and the dual step size),feasibility_violation_off(), and theuncorrelatednessmatrix innonredundancy. Numerical results underfeasibilityConstraintType = 1may differ from earlier versions unless the input hastr(Sigma) = 1. - Additional input checks for
mspca(). - Minor documentation updates and clarification.
- Added the
snp500dataset: the market-deflated correlation matrix of daily log-returns for 423 S&P 500 constituents, January 2010 - December 2019 (423 x 423, xz-compressed). - Added a vignette “Case study: sparse factors in S&P 500 returns”, a full application of
mspca()tosnp500comparing the two non-redundancy constraints. - Added a vignette “Algorithm and implementation notes”, documenting the optimization problem, both algorithms, the implicit matrix-vector implementation, computational complexity, and guidance on parameter choices.
- Added a website-only article “Benchmarking against other sparse PCA packages”, comparing
mspca()against seven competing implementations on four real datasets. It lives invignettes/articles/and is not part of the CRAN build. - Added
replication/, the scripts reproducing the benchmarking and case-study results. Build-ignored. -
DESCRIPTIONgainsDepends: R (>= 3.5),LazyData: true,LazyDataCompression: xzandBugReports.
msPCA 0.5.0
CRAN release: 2026-06-25
-
mspca()andtpm()now take two possible inputs: the covariance/correlation matrix or the data matrix directly. In practice, the functions take single generic argumentMtogether with atype = c("Sigma", "X")selector.type = "Sigma"(the default) treatsMas a covariance/correlation matrix (p x p);type = "X"treatsMas a raw data matrix (n observations x p variables). The"Sigma"default preserves the behaviour of existing matrix-based calls. - The raw-data path applies the algorithm to the data directly: each product
Sigma %*% betais evaluated ast(X) %*% (X %*% beta) / (n - 1)at cost O(np), and the p x p matrix is never materialized. This substantially improves scalability whenn << p. The covariance back-end was refactored behind a covariance-operator abstraction (DenseOp/GramOp) shared by both input modes. - Added preprocessing controls for
type = "X":center,scale(covariance vs correlation), anddivisor(“n-1” or “n”). - Added validation for both input modes: a
Sigmainput is checked for squareness, symmetry and positive semidefiniteness (checkPSD,symTolerance,psdTolerance); anXinput is checked for finiteness, dimensions and (when scaling) zero-variance columns. -
mspca()results now includevariance_explained(per-PC) andtotal_variance;X-mode results also recordinputType,center,scale,divisor,nObsandp. -
mspca()andtpm()now return S3 objects of class"mspca"and"tpm"respectively, enabling use of standard R generics. - Added
print.mspca(): S3 print method displaying the sparse loading matrix restricted to the union of active variables, the percentage of variance explained per PC, and the number of non-zero loadings. Replaces the removedprint_mspca(). - Added
summary.mspca(): produces a per-PC table of sparsity, variance explained, FVE, and cumulative FVE, followed by the full pairwise feasibility violation matrix. - Updated citation
msPCA 0.4.1
CRAN release: 2026-06-12
- Standardized function man page titles to consistent title style.
- Removed unnecessary
library(datasets)calls from examples while keeping explicitdatasets::mtcarsusage, and addeddatasetstoSuggeststo align example dependencies with CRAN guidance. - Improved efficiency and clarity of R code
- Added a vignette
msPCA 0.4.0
CRAN release: 2026-05-22
- Renamed hyperparameters controlling truncated power method restart budgets for clearer and more consistent API naming.
- Documentation polish across function docs and package materials.
- Removed
pairwise_correlation()andorthogonality_violation()and replaced them with a unifiedfeasibility_violation_off()helper for feasibility diagnostics across constraint types.
msPCA 0.3.0
CRAN release: 2026-05-15
- Improved scalability of
mspca()andtpw()through algorithmic and implementation optimizations. - Function
mspca()now accepts a new hyper-parameterminRestartTPMthat limits the number of random restarts for the truncated power method after the first outer iteration - Improved scaling of the penalty parameters for the case of zero-correlation constraints
- Fixed incorrect acronym for truncated power method (TPW <- TPM)
msPCA 0.2.0
CRAN release: 2026-01-12
- Added support for no-correlation constraints between PCs as well as orthogonality constraints. User chooses between orthogonality and uncorrelatedness constraints via the
feasibilityConstraintTypeparameter tomsPCA(). - Renamed return field from
orthogonality_violationtofeasibility_violationto support both constraint types. - Renamed function
feasibility_violation()asorthogonality_violation()to be more explicit - Created function
pairwise_correlation() - Added warning message when no feasible solution is found