kernel_pls_rbf — Kernel PLS (Rosipal & Trejo 2001)

Group: Nonlinear / local · Registry tolerance: 1e-08

Description

Non-linear kernel PLS (RBF kernel)

Registry note — R kernlab::kernelMatrix (RBF/poly/sigmoid) + pls::plsr on the centered kernel matrix is the Rosipal-Trejo (2001) reference. pls4all’s deflation ordering differs from the kernel-PLS-2 of Rosipal & Trejo so parity is qualitative.

Parameters

Name

Type

Default

Notes

n_components

int

4

registry benchmark cell value

kernel_type

int

1

registry benchmark cell value

gamma

float

0.02

registry benchmark cell value

coef0

float

1.0

registry benchmark cell value

degree

int

3

registry benchmark cell value

Explanations

Bibliographic source

Rosipal, R. & Trejo, L. J. (2001). Kernel partial least squares regression in reproducing kernel Hilbert space. Journal of Machine Learning Research 2, 97–123. Verified primary link: https://www.jmlr.org/papers/v2/rosipal01a.html.

Mathematical principle

Kernel PLS extracts response-oriented components from a centred training Gram matrix. For new rows the implementation evaluates their kernel against every stored training row, centres that cross-kernel with the saved training row and grand means, and applies the learned dual coefficients. RBF, polynomial, and sigmoid kernels are available through the kernel configuration.

Appropriate uses

Nonlinear calibration when similarity in a chosen kernel space is scientifically plausible.

Limits and validation

Prediction needs all training rows, costs O(n_train*n_new), and training stores an O(n_train^2) Gram matrix; kernel parameters require nested validation.

Implementation

Out-of-sample prediction is implemented and requires the stored training predictors. Its memory is \(O(n_{train}^2)\) for the Gram matrix and prediction kernel work is \(O(n_{train}n_{new})\).

Sources and provenance

Current implementation: cpp/src/core/kernel_pls.cpp.

API and bindings

C ABI (ABI 2): n4m_estimators_kernel_pls_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): kernel_pls_fit(X, Y, n_components, kernel_type = 1L, gamma = 0.0, coef0 = 1.0, degree = 3L).

The source signature has additional required inputs, so no example call is fabricated.

MATLAB / Octave (source-verified): kernel_pls(X, Y, n_components, kernel_type, gamma, coef0, degree).

The source signature has additional required inputs, so no example call is fabricated.

Registry parity references 📐

  • 📐 ref.r_kernlab_pls (R · r) — kernlab+pls 0.9.33+2.8.5 · strict (rmse_rel ≤ 1e-08) — R kernlab::kernelMatrix (RBF/poly/sigmoid) + pls::plsr on the centered kernel matrix is a Rosipal-Trejo-style kernel PLS reference. pls4all uses a different deflation order so the parity is qualitative.

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.

BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-153.07 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind3.23 ms
pls4all.sklearn✓ bind3.23 ms
R · archived pls4all benchmark
pls4all.R✓ 1e-146.34 ms
pls4all.R.formula✓ 1e-147.05 ms
pls4all.R.mdatools✓ 1e-146.83 ms
pls4all.R.pls✓ 1e-147.21 ms
R · external
📐ref.r_kernlab_plssource28.6 ms
BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-153.12 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind3.17 ms
pls4all.sklearn✓ bind3.29 ms
R · archived pls4all benchmark
pls4all.R✓ 1e-145.98 ms
pls4all.R.formula✓ 1e-147.13 ms
pls4all.R.mdatools✓ 1e-147.16 ms
pls4all.R.pls✓ 1e-147.20 ms
R · external
📐ref.r_kernlab_plssource27.3 ms
BackendParity200×50 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 5e-153.18 ms
Python · archived pls4all benchmark
pls4all.python✓ bind3.14 ms🏆
pls4all.sklearn✓ bind3.22 ms
R · archived pls4all benchmark
pls4all.R✓ 1e-146.09 ms
pls4all.R.formula✓ 1e-147.28 ms
pls4all.R.mdatools✓ 1e-147.22 ms
pls4all.R.pls✓ 1e-147.41 ms
R · external
📐ref.r_kernlab_plssource40.0 ms

See also: benchmark overview · methods index · interactive dashboard