pls_glm — PLS generalized linear regression¶
Group: Classification & GLM · Registry tolerance: 1e-06
Description¶
PLS-GLM (§5) — softmax/Poisson IRLS on PLS scores
Registry note — R
plsRglm::plsRglm(Bastien, Vinzi & Tenenhaus 2005) withscaleX=FALSE. pls4all’s default now mirrors the plsRglm algorithm exactly: per-component partial-regression weights (Gaussian-identity uses closed-form OLS; Poisson-log uses IRLS), score-space GLM coefficients, and per-target stacking. The native C++ kernel (legacy=True) runs the same algorithm.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
Explanations¶
Bibliographic source¶
Bastien, P., Esposito Vinzi, V. & Tenenhaus, M. (2005). PLS generalised linear regression. Computational Statistics & Data Analysis 48(1), 17–46. DOI 10.1016/j.csda.2004.02.005.
Mathematical principle¶
Component \(k\) weights column \(j\) by the coefficient of the deflated \(\mathbf X_j\) in the GLM of \(y\) on \((1,\mathbf t_1,\dots,\mathbf t_{k-1},\mathbf X_j)\); the normalized weights give the score \(\mathbf t_k\) and \(\mathbf X\) is deflated on it. A final GLM of \(y\) on \((1,\mathbf T)\) with the identity, log or logit link is folded back to the input scale through \(\mathbf W(\mathbf P^\top\mathbf W)^{-1}\).
Appropriate uses¶
Generalized linear regression of continuous (Gaussian), count (Poisson) or proportion (binomial) responses on many collinear spectral predictors.
Limits and validation¶
Weights come from one GLM fit per column and component, so the Poisson and binomial fits cost p IRLS solves per component; X is not scaled (plsRglm scaleX = FALSE), and separable binomial data make the logit coefficients diverge.
Implementation¶
One model per response column, as plsRglm with scaleX = FALSE: Gaussian weights use the closed-form partial regression, Poisson and binomial weights and the final score model use IRLS (at most max_iter steps, tolerance tol). Predictions are the mean response \(g^{-1}(\mathbf X\mathbf B+b_0)\).
Sources and provenance¶
Current implementation: cpp/src/core/extra_pls.cpp.
API and bindings¶
C ABI (ABI 2): n4m_estimators_pls_glm_fit. Use the linked public header for the exact signature, configuration, and result handles.
Python: no current AST-verified public n4m re-export was found for this method. The linked C ABI above is the documented surface in this checkout.
R (source-verified): pls_glm(formula, data, ncomp = 2L, family = "gaussian", na.action = stats::na.omit).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): pls_glm(X, Y, n_components, family).
The source signature has additional required inputs, so no example call is fabricated.
Registry parity references 📐
📐
ref.r_plsrglm(R · r) —plsRglm1.5.1 · strict (rmse_rel ≤ 1e-06) — RplsRglm::plsRglm(Bastien, Vinzi & Tenenhaus 2005) with thepls-glm-gaussian/pls-glm-poissonfamily. The native n4m kernel implements the same algorithm (ABI 2.13).
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-06).
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×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 1e-15 | 3.57 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 7.99 ms |
pls4all.sklearn | ⇄ +4e-01 | 2.74 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +4e-01 | 7.97 ms |
pls4all.R.formula | ⇄ +4e-01 | 22.7 ms |
pls4all.R.mdatools | ⇄ +4e-01 | 25.8 ms |
pls4all.R.pls | ⇄ +4e-01 | 18.4 ms |
| R · external | ||
📐ref.r_plsrglm | source | 240.6 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 1e-15 | 3.56 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 8.04 ms |
pls4all.sklearn | ⇄ +4e-01 | 1.50 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +4e-01 | 4.56 ms |
pls4all.R.formula | ⇄ +4e-01 | 5.18 ms |
pls4all.R.mdatools | ⇄ +4e-01 | 5.40 ms |
pls4all.R.pls | ⇄ +4e-01 | 5.24 ms |
| R · external | ||
📐ref.r_plsrglm | source | 138.8 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 1e-15 | 2.07 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 2.05 ms |
pls4all.sklearn | ⇄ +4e-01 | 1.46 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +4e-01 | 3.78 ms |
pls4all.R.formula | ⇄ +4e-01 | 5.59 ms |
pls4all.R.mdatools | ⇄ +4e-01 | 4.89 ms |
pls4all.R.pls | ⇄ +4e-01 | 4.78 ms |
| R · external | ||
📐ref.r_plsrglm | source | 134.0 ms |
See also: benchmark overview · methods index · interactive dashboard