genpca
0.2.1Generalized Principal Component Analysis
Overview
Generalized PCA and related matrix decompositions in weighted inner-product spaces. Methods are based on Allen, G. I., Grosenick, L., and Taylor, J. (2014) doi:10.1080/01621459.2013.852978, "A generalized least-square matrix decomposition", Journal of the American Statistical Association, 109(505), 145-159; and Abdi, H. (2007), "Singular value decomposition (SVD) and generalized singular value decomposition" https://personal.utdallas.edu/~herve/Abdi-SVD2007-pretty.pdf, in "Encyclopedia of Measurement and Statistics", 907-912.
CRAN resubmission fixes
- The internal MN-PCA SPD solver now rejects non-finite matrices before Cholesky factorization and verifies that the computed inverse is finite. This makes its failure behavior consistent across BLAS/LAPACK implementations.
From NEWS.md in the release
Install
Health
ERRORtestsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-windows-x86_64
r-devel-windows-x86_64, r-release-windows-x86_64
Running 'testthat.R' [48s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Using p
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-debian-clang
Running ‘testthat.R’ [58s/74s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-debian-gcc
Running ‘testthat.R’ [36s/50s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-fedora-clang
Running ‘testthat.R’ [36s/38s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-devel-linux-x86_64-fedora-gcc
Running ‘testthat.R’ [35s/35s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 73 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 73 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-oldrel-windows-x86_64
Running 'testthat.R' [71s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Using p
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-patched-linux-x86_64
Running ‘testthat.R’ [56s/72s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution haltedr-release-linux-x86_64
Running ‘testthat.R’ [56s/66s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(genpca)
Registered S3 method overwritten by 'genpca':
method from
transfer.cross_projector multivarious
Attaching package: 'genpca'
The following object is masked from 'package:base':
truncate
>
> test_check("genpca")
Solving generalized eigenproblem C v = lambda R v...
Preparing constraints...
Applying pre-processing...
Using one-shot eigen decomposition (gmdLA) to extract 1 components...
gmdLA: Using primal approach (n >= p)
Computing factorization for matrix R
Calculating X'QX...
Calculating F' X'QX F...
Performing eigen decomposition on target matrix (dim: 4)...
(Found 1 eigenvalues > tol)
Calculating ov (V = F^{-T} * eigenvectors)...
Calculating ou (U)...
Calculating explained variance...
Constructing final object...
GPCA finished.
gmdLA: Usi
...[truncated]...
stopping.
sigma is 3.00269080945555
sigma is 3.40988208633537
MSE no constraint: 0.2154146
MSE adjacency: 0.2154525
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-gplssvd_op.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-gplssvd-op-large.R:99:3'): irlba backend works beyond the dense fallback threshold ──
Error in `irlba::irlba(A0, nv = k, nu = k, work = max(3 * k, k + 1), tol = if (!is.null(svd_opts$tol)) svd_opts$tol else 1e-07, maxit = if (!is.null(svd_opts$maxitr)) svd_opts$maxitr else 1000, mult = mult_fun, fastpath = FALSE)`: starting vector near the null space
Backtrace:
▆
1. └─genpca::gplssvd_op(X, Y, k = k, svd_backend = "irlba") at test-gplssvd-op-large.R:99:3
2. └─irlba::irlba(...)
[ FAIL 1 | WARN 83 | SKIP 1 | PASS 1582 ]
Error:
! Test failures.
Execution halted- ERROR4 OK, 9 ERRORNow
- ERROR11 OK, 2 ERROR2026-10-06
- OK7 OK2026-09-16
Documentation
- Help pages
- 44 (26 internal)includes a package overview page
- Examples that run
- 100%15 run in a plain check (3 of them under a condition)
- Exported functions with examples
- 86%
- Documented parameters
- 90%
- Return-value docs
- 93%
- Help pages citing references
- 20%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- not measured
Issues over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/bbuchsbaum/genpca on 2026-10-11.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-09-16 · The repository has a site deploy workflow
pkgdown site last built 2026-09-16
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-08-22Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: CLAUDE.mdCommits: at least 33 crediting it in the message
- Claude Opus 512 commits · Aug 2026
- Claude Fable 57 commits · Aug 2026
- Claude Opus 4.73 commits · Apr 2026
- Claude Opus 4.61 commit · Feb 2026
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.1Latest
- 0.2.02026-09-15
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-15
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("genpca")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.