o2pls — O2-PLS (two-way orthogonal)

Group: Multi-block / cross-modal · Registry tolerance: 1e-10

Description

O2PLS — bi-directional OPLS (Trygg & Wold 2003)

Registry note — R OmicsPLS::o2m 2.1.0 (Bouhaddani 2018) joint-SVD O2PLS. pls4all defaults to the OmicsPLS::o2m algorithm and matches R bit-for-bit (~1e-13 max_abs). The pre-0.97 peel-then-PLS path (Trygg & Wold 2003 §3.2 power-iteration recipe) is reachable via the legacy=True adapter kwarg / cfg.solver = NIPALS.

Parameters

Name

Type

Default

Notes

n_targets

int

4

registry benchmark cell value

n_predictive

int

2

registry benchmark cell value

n_x_orthogonal

int

1

registry benchmark cell value

n_y_orthogonal

int

1

registry benchmark cell value

Explanations

Bibliographic source

Trygg, J. & Wold, S. (2003). O2-PLS, a two-block (X–Y) latent variable regression method with an integral OSC filter. Journal of Chemometrics 17(1), 53–64. Verified primary link: https://doi.org/10.1002/cem.775.

Mathematical principle

O2-PLS extends OPLS symmetrically to both \(\mathbf{X}\) and \(\mathbf{Y}\): it decomposes each block into a joint predictive component plus block-orthogonal components. Unlike OPLS, which is asymmetric (\(\mathbf{Y}\) drives the decomposition of \(\mathbf{X}\)), O2-PLS treats both matrices as observation blocks of equal status.

Required hyperparameters: \(n_{\mathrm{pred}}\) (joint components), \(n_{\mathrm{X,ortho}}\) (X-unique orthogonal), \(n_{\mathrm{Y,ortho}}\) (Y-unique orthogonal). Choosing all three by cross-validation is a 3-D grid which can be expensive; a common compromise fixes the orthogonal counts at 1 and tunes only \(n_{\mathrm{pred}}\).

O2-PLS is dominant in metabolomics ↔ transcriptomics integration where the analyst wants to disentangle platform-specific orthogonal variation from biology that is consistent across platforms.

Appropriate uses

Two-block integration that separates joint predictive covariance from block-specific structured variation.

Limits and validation

Joint and orthogonal ranks are not identified automatically and may be unstable in small samples.

Implementation

n4m_estimators_o2pls_fit. Reference: CRAN OmicsPLS 2.1.0.

Sources and provenance

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

API and bindings

C ABI (ABI 2): n4m_estimators_o2pls_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): o2pls(formula, data, n_predictive = 2L, n_x_orthogonal = 1L, n_y_orthogonal = 1L, na.action = stats::na.omit).

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

MATLAB / Octave (source-verified): o2pls(X, Y, n_predictive, n_x_orthogonal, n_y_orthogonal).

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

Registry parity references 📐

  • 📐 ref.r_omicspls (R · r) — OmicsPLS 2.1.0 · strict (rmse_rel ≤ 1e-10) — R OmicsPLS::o2m (Bouhaddani 2018), joint-SVD O2PLS. pls4all’s default O2PLS path now matches this algorithm bit-for-bit (max_abs ~1e-13 on the parity sizes); the legacy peel-then-PLS implementation is opt-in.

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-10).

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 4e-101.21 ms
Python · archived pls4all benchmark
pls4all.python✓ bind1.19 ms🏆
pls4all.sklearn✓ 9e-161.37 ms
R · archived pls4all benchmark
pls4all.R✓ bind2.69 ms
pls4all.R.formula✓ bind3.44 ms
pls4all.R.mdatools✓ bind3.42 ms
pls4all.R.pls✓ bind3.58 ms
R · external
📐ref.r_omicsplssource7.21 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 4e-101.22 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind1.24 ms
pls4all.sklearn✓ 9e-161.44 ms
R · archived pls4all benchmark
pls4all.R✓ bind2.78 ms
pls4all.R.formula✓ bind3.52 ms
pls4all.R.mdatools✓ bind3.53 ms
pls4all.R.pls✓ bind3.68 ms
R · external
📐ref.r_omicsplssource7.41 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 4e-101.24 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind2.09 ms
pls4all.sklearn✓ 9e-161.45 ms
R · archived pls4all benchmark
pls4all.R✓ bind3.09 ms
pls4all.R.formula✓ bind3.52 ms
pls4all.R.mdatools✓ bind3.49 ms
pls4all.R.pls✓ bind3.25 ms
R · external
📐ref.r_omicsplssource7.31 ms

See also: benchmark overview · methods index · interactive dashboard