pls_logistic — PLS-logistic regression¶
Group: Classification & GLM · Registry tolerance: 1e-08
Description¶
PLS-Logistic — Logistic regression on PLS scores
Registry note — sklearn
PLSRegression -> LogisticRegressionpipeline vs pls4all’s single-pass PLS + softmax IRLS. Latent decompositions differ; parity is qualitative.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
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. Verified primary link: https://doi.org/10.1016/j.csda.2004.02.005.
Mathematical principle¶
The implementation extracts a fixed PLS score matrix, then fits a ridge-regularized multinomial logistic model on those scores with Newton updates and a softmax likelihood. Unlike iterative PLS-GLR variants, it does not recompute PLS directions from an IRLS working response.
Appropriate uses¶
Multiclass probabilistic classification with a linear softmax model on a fixed PLS score representation.
Limits and validation¶
PLS scores are fitted once before Newton optimization rather than recomputed from each IRLS working response; ridge and component count need validation.
Implementation¶
Probabilities are produced by the multinomial softmax head in cpp/src/core/pls_logistic.cpp. Component count, regularization, and convergence settings all affect calibration.
Sources and provenance¶
Current implementation: cpp/src/core/pls_logistic.cpp.
API and bindings¶
C ABI (ABI 2): n4m_estimators_pls_logistic_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_logistic_fit(X, y_labels, n_components, n_classes = NULL).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): pls_logistic(X, y_labels, n_components, n_classes).
The source signature has additional required inputs, so no example call is fabricated.
Registry parity references 📐
📐
ref.python_scikit_learn(python · python) —scikit-learn1.8.0 · strict (rmse_rel ≤ 1e-08) — sklearnPLSRegression -> LogisticRegressionpipeline. pls4all’s PLS-Logistic does a single PLS + softmax IRLS in C; sklearn fits PLS on one-hot Y, then a multinomial LogisticRegression on the scores. Both are valid PLS-logistic pipelines but the latent decompositions differ; parity is on the decision-score shape.
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×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 6e-16 | 3.14 ms🏆 |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 3.34 ms |
| Python · external | ||
📐ref.python_scikit_learn | source | 3.44 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 6e-16 | 3.20 ms🏆 |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 3.81 ms |
| Python · external | ||
📐ref.python_scikit_learn | source | 23.2 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 6e-16 | 4.74 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 4.36 ms🏆 |
| Python · external | ||
📐ref.python_scikit_learn | source | 5.41 ms |
See also: benchmark overview · methods index · interactive dashboard