group_sparse_pls — Group-sparse PLS (Liquet 2016)

Group: Sparse · Registry tolerance: 1e-08

Description

Group sparse PLS (§7)

Registry note — R sgPLS::gPLS (Liquet et al. 2016, regression mode, scale=TRUE). The archived benchmark’s default Python reference is a deterministic NumPy port of that algorithm. Its legacy=True route invokes the native C ABI, which uses post-SIMPLS coefficient shrinkage; these are distinct estimators, not numerical equivalents.

Parameters

Name

Type

Default

Notes

X

Any

required

current public binding signature

y

Any

required

current public binding signature

n_components

int

2

current public binding signature

group_assignment

Any

required

current public binding signature

group_lambda

float

0.05

current public binding signature

Explanations

Bibliographic source

Liquet, B., de Micheaux, P. L., Hejblum, B. P. & Thiébaut, R. (2016). Group and sparse group partial least squares approaches applied in genomics context. Bioinformatics 32(1), 35–42. Verified primary link: https://doi.org/10.1093/bioinformatics/btv535.

Mathematical principle

The routine fits ordinary SIMPLS, then applies the proximal map B_g <- max(0, 1 - group_lambda / ||B_g||_F) B_g to each group of predictive coefficient rows. Entire groups can be zeroed, but latent directions are not refitted.

Appropriate uses

Exploratory group selection with predefined wavelength groups when post-fit coefficient shrinkage is acceptable.

Limits and validation

The penalty shrinks predictive coefficient groups and affects predictions, but does not refit latent directions or implement sgPLS::gPLS. Its units depend on raw-X and target scaling; select it using held-out data.

Implementation

group_lambda applies group-lasso proximal shrinkage to the returned SIMPLS predictive coefficients. This changes predictions but is not a latent-direction refit or a numerical implementation of sgPLS::gPLS.

Sources and provenance

Current implementation: cpp/src/core/extra_pls.cpp.

API and bindings

C ABI (ABI 2): n4m_estimators_group_sparse_pls_fit. Use the linked public header for the exact signature, configuration, and result handles.

Python (verified public re-export):

from n4m.estimators.regression.sparse import group_sparse_pls

Source signature: group_sparse_pls(X: Any, y: Any, *, n_components: int = 2, group_assignment: Any, group_lambda: float = 0.05) (n4m/estimators/regression/sparse.py).

R (source-verified): group_sparse_pls_fit(X, Y, n_components, group_assignment, group_lambda = 0.05).

The source signature has additional required inputs, so no example call is fabricated.

MATLAB / Octave (source-verified): group_sparse_pls(X, Y, n_components, group_assignment, group_lambda).

The source signature has additional required inputs, so no example call is fabricated.

Registry parity references 📐

  • 📐 ref.python_numpy (python · python) — numpy in-tree · strict (rmse_rel ≤ 1e-08) — In-tree NumPy port of Liquet et al. 2016 group sparse PLS (R sgPLS::gPLS, regression mode, scale=TRUE). The archived default Python reference uses that port. The opt-in native route uses post-SIMPLS coefficient shrinkage and is not numerically equivalent to sgPLS::gPLS.

  • 📐 ref.r_sgpls (R · r) — sgPLS 1.8.1 · strict (rmse_rel ≤ 1e-08) — R sgPLS::gPLS(X, Y, ncomp, ind.block.x, keepX=length(bnd)) (regression, scale=TRUE). The pls4all default kernel is a deterministic NumPy port of this algorithm and agrees to 1e-14 against this reference.

Benchmarks

Archived measurement identity. Backend labels in this table are the raw IDs recorded when the benchmark ran (including historical pls4all.* IDs). They preserve measurement provenance and do not describe a current public Python, R, or MATLAB binding; use the source-verified API and bindings section above for current entry points.

Adaptive wall-clock per cell measured against full_matrix.csv. Only backends that implement this method are listed; libraries without the method are omitted.

Verdict  ·  ✓ ref / ≈ ref / ~ shape mark a reference-gate pass at strict / relaxed / qualitative tolerance  ·  ✓ bind = archived binding-harness result agrees with the C++ baseline  ·  ⇄ cross-check = documented by-design selector/RNG/model, noncanonical API/facade convention, or secondary oracle  ·  ✗ divergent  ·  ⚠ error  ·  — not run. The fastest backend per column is marked 🏆.

Reference gate: strict — numeric equivalence (rmse_rel_tol ≤ 1e-08).

Rows tagged with 📐 are the canonical parity references for this method (declared in parity_timing.registry). C++ and external rows show reference parity; archived language-harness rows show binding parity against the C++ backend. Hover the icon for role and tolerance band.

BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref8.36 ms
Python · archived pls4all benchmark
pls4all.python✓ bind7.86 ms
pls4all.sklearn⇄ +1e-013.79 ms
R · archived pls4all benchmark
pls4all.R⇄ +1e-019.70 ms
pls4all.R.formula⇄ +1e-0111.0 ms
pls4all.R.mdatools⇄ +1e-0110.2 ms
pls4all.R.pls⇄ +1e-0111.0 ms
Python · external
📐ref.python_numpysource2.98 ms🏆
R · external
📐ref.r_sgpls⇄ +1e-1533.7 ms
BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref2.62 ms
Python · archived pls4all benchmark
pls4all.python✓ bind2.76 ms
pls4all.sklearn⇄ +1e-012.28 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +1e-018.78 ms
pls4all.R.formula⇄ +1e-019.80 ms
pls4all.R.mdatools⇄ +1e-0111.9 ms
pls4all.R.pls⇄ +1e-0110.5 ms
Python · external
📐ref.python_numpysource3.11 ms
R · external
📐ref.r_sgpls⇄ +1e-1531.2 ms
BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref2.91 ms
Python · archived pls4all benchmark
pls4all.python✓ bind2.69 ms
pls4all.sklearn⇄ +1e-012.53 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +1e-017.45 ms
pls4all.R.formula⇄ +1e-019.19 ms
pls4all.R.mdatools⇄ +1e-0111.3 ms
pls4all.R.pls⇄ +1e-018.50 ms
Python · external
📐ref.python_numpysource2.66 ms
R · external
📐ref.r_sgpls⇄ +1e-1526.7 ms

See also: benchmark overview · methods index · interactive dashboard