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. Itslegacy=Trueroute invokes the native C ABI, which uses post-SIMPLS coefficient shrinkage; these are distinct estimators, not numerical equivalents.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
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) —numpyin-tree · strict (rmse_rel ≤ 1e-08) — In-tree NumPy port of Liquet et al. 2016 group sparse PLS (RsgPLS::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) —sgPLS1.8.1 · strict (rmse_rel ≤ 1e-08) — RsgPLS::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.
| Backend | Parity | 200×50 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref | 8.36 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 7.86 ms |
pls4all.sklearn | ⇄ +1e-01 | 3.79 ms |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +1e-01 | 9.70 ms |
pls4all.R.formula | ⇄ +1e-01 | 11.0 ms |
pls4all.R.mdatools | ⇄ +1e-01 | 10.2 ms |
pls4all.R.pls | ⇄ +1e-01 | 11.0 ms |
| Python · external | ||
📐ref.python_numpy | source | 2.98 ms🏆 |
| R · external | ||
📐ref.r_sgpls | ⇄ +1e-15 | 33.7 ms |
| Backend | Parity | 200×50 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref | 2.62 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 2.76 ms |
pls4all.sklearn | ⇄ +1e-01 | 2.28 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +1e-01 | 8.78 ms |
pls4all.R.formula | ⇄ +1e-01 | 9.80 ms |
pls4all.R.mdatools | ⇄ +1e-01 | 11.9 ms |
pls4all.R.pls | ⇄ +1e-01 | 10.5 ms |
| Python · external | ||
📐ref.python_numpy | source | 3.11 ms |
| R · external | ||
📐ref.r_sgpls | ⇄ +1e-15 | 31.2 ms |
| Backend | Parity | 200×50 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref | 2.91 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 2.69 ms |
pls4all.sklearn | ⇄ +1e-01 | 2.53 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +1e-01 | 7.45 ms |
pls4all.R.formula | ⇄ +1e-01 | 9.19 ms |
pls4all.R.mdatools | ⇄ +1e-01 | 11.3 ms |
pls4all.R.pls | ⇄ +1e-01 | 8.50 ms |
| Python · external | ||
📐ref.python_numpy | source | 2.66 ms |
| R · external | ||
📐ref.r_sgpls | ⇄ +1e-15 | 26.7 ms |
See also: benchmark overview · methods index · interactive dashboard