pls_qda — PLS-QDA¶
Group: Classification & GLM · Registry tolerance: 1e-06
Description¶
PLS-QDA (§5) — quadratic discriminant on PLS scores
Registry note — sklearn
PLSRegression(scale=False) -> QuadraticDiscriminantAnalysis(reg_param=0.0)pipeline. pls4all’s default now mirrors this convention: NIPALS PLS scores via the C kernel, then sklearn-style QDA predict_proba in Python. The legacy single-pass C++ kernel (SIMPLS + identity-covariance log-posterior) is opt-in vialegacy=True.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
Explanations¶
Bibliographic source¶
Pérez-Enciso, M. & Tenenhaus, M. (2003). Prediction of clinical outcome with microarray data: a partial least squares discriminant analysis (PLS-DA) approach. Human Genetics 112, 581–592. DOI 10.1007/s00439-003-0921-9.
Mathematical principle¶
PLS first supplies a low-dimensional supervised score space. QDA then estimates a separate mean and regularized covariance for each class and compares Gaussian discriminant scores including the empirical log class prior.
Appropriate uses¶
Classification on PLS scores when class-specific covariance matrices are supported by enough samples.
Limits and validation¶
Class priors are empirical in the current implementation; class-specific covariance estimates can be singular or unstable for small classes.
Implementation¶
Current priors are observed class proportions; there is no uniform-prior or caller-supplied-prior option on this path. Covariance regularization remains necessary when class samples are few.
Sources and provenance¶
Current implementation: cpp/src/core/extra_pls.cpp.
API and bindings¶
C ABI (ABI 2): n4m_estimators_pls_qda_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_qda_fit(X, y_labels, n_components).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): pls_qda(X, y_labels, n_components).
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-06) — sklearnPLSRegression(scale=False) -> QuadraticDiscriminantAnalysis(reg_param=0.0)pipeline. pls4all’s default PLS-QDA reuses the same convention: NIPALS PLS scores from the C kernel, then sklearn-style QDA in Python. Bit-for-bit parity (max_abs < 1e-6).
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 5e-16 | 2.65 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 2.12 ms |
pls4all.sklearn | ⇄ +2e+00 | 2.11 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +2e+00 | 4.06 ms |
pls4all.R.formula | ⇄ +2e+00 | 4.67 ms |
pls4all.R.mdatools | ⇄ +2e+00 | 5.46 ms |
pls4all.R.pls | ⇄ +2e+00 | 4.99 ms |
| Python · external | ||
📐ref.python_scikit_learn | source | 2.36 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 5e-16 | 1.94 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 1.92 ms |
pls4all.sklearn | ⇄ +2e+00 | 1.64 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +2e+00 | 8.84 ms |
pls4all.R.formula | ⇄ +2e+00 | 18.1 ms |
pls4all.R.mdatools | ⇄ +2e+00 | 18.2 ms |
pls4all.R.pls | ⇄ +2e+00 | 13.5 ms |
| Python · external | ||
📐ref.python_scikit_learn | source | 6.90 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 5e-16 | 5.99 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 4.32 ms |
pls4all.sklearn | ⇄ +2e+00 | 1.49 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ +2e+00 | 3.90 ms |
pls4all.R.formula | ⇄ +2e+00 | 5.11 ms |
pls4all.R.mdatools | ⇄ +2e+00 | 5.10 ms |
pls4all.R.pls | ⇄ +2e+00 | 5.08 ms |
| Python · external | ||
📐ref.python_scikit_learn | source | 2.39 ms |
See also: benchmark overview · methods index · interactive dashboard