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 via legacy=True.

Parameters

Name

Type

Default

Notes

n_components

int

4

registry benchmark cell value

n_classes

int

3

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-learn 1.8.0 · strict (rmse_rel ≤ 1e-06) — sklearn PLSRegression(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.

BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-162.65 ms
Python · archived pls4all benchmark
pls4all.python✓ bind2.12 ms
pls4all.sklearn⇄ +2e+002.11 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +2e+004.06 ms
pls4all.R.formula⇄ +2e+004.67 ms
pls4all.R.mdatools⇄ +2e+005.46 ms
pls4all.R.pls⇄ +2e+004.99 ms
Python · external
📐ref.python_scikit_learnsource2.36 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-161.94 ms
Python · archived pls4all benchmark
pls4all.python✓ bind1.92 ms
pls4all.sklearn⇄ +2e+001.64 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +2e+008.84 ms
pls4all.R.formula⇄ +2e+0018.1 ms
pls4all.R.mdatools⇄ +2e+0018.2 ms
pls4all.R.pls⇄ +2e+0013.5 ms
Python · external
📐ref.python_scikit_learnsource6.90 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-165.99 ms
Python · archived pls4all benchmark
pls4all.python✓ bind4.32 ms
pls4all.sklearn⇄ +2e+001.49 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +2e+003.90 ms
pls4all.R.formula⇄ +2e+005.11 ms
pls4all.R.mdatools⇄ +2e+005.10 ms
pls4all.R.pls⇄ +2e+005.08 ms
Python · external
📐ref.python_scikit_learnsource2.39 ms

See also: benchmark overview · methods index · interactive dashboard