rosa — ROSA (Response-Oriented Sequential Alternation)

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

Description

ROSA — Response-Oriented Sequential Alternation (§19)

Registry note — Canonical multiblock ROSA (Liland, Næs & Indahl 2016). Both references implement the canonical formulation; pls4all matches them bit-for-bit (max_abs < 1e-6) for single-target Y. The R reference centers multi-target Y incorrectly (recycles colMeans(y) rather than broadcasting), so multi-target parity is intentionally evaluated against the NumPy reference.

Parameters

Name

Type

Default

Notes

n_targets

int

1

registry benchmark cell value

n_blocks

int

3

registry benchmark cell value

n_components

int

4

registry benchmark cell value

Explanations

Bibliographic source

Liland, K. H., Næs, T. & Indahl, U. G. (2016). ROSA—a fast extension of partial least squares regression for multiblock data analysis. Journal of Chemometrics 30(11), 651–662. DOI 10.1002/cem.2824.

Mathematical principle

ROSA is a forward-greedy multi-block PLS: at each component extraction step, it tries one new component from every block and keeps the block whose new component most reduces residual variance in \(\mathbf{y}\). The component sequence is therefore data-driven rather than pre-specified by the user.

This auto-attribution makes ROSA a strong default when the analyst has no prior on which block matters most: the block budget is allocated dynamically. ROSA is also much faster than SO-PLS for large block counts because it adds one component per iteration rather than refitting an inner PLS per block.

Output includes the block-attribution vector — the sequence of block indices selected — which is the main interpretive artefact: it tells you which block contributed which component, in order.

Appropriate uses

Response-oriented sequential extraction across blocks when each component should be assigned to a contributing block.

Limits and validation

Greedy block selection and block scaling can change the extraction order and the resulting interpretation.

Implementation

n4m_estimators_rosa_fit. Reference: CRAN multiblock 0.8.10.

Sources and provenance

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

API and bindings

C ABI (ABI 2): n4m_estimators_rosa_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): rosa_fit(X, Y, n_components, block_sizes).

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

MATLAB / Octave (source-verified): rosa(X, Y, n_components, block_sizes).

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

Registry parity references 📐

  • 📐 ref.python_numpy (python · python) — numpy 2.2.6 · strict (rmse_rel ≤ 1e-06) — Canonical multiblock ROSA in NumPy (Liland, Næs & Indahl 2016). Reproduces R multiblock::rosa(canonical=TRUE) exactly for single-target Y; for q >= 2 it uses proper column-mean centering and diverges from R multiblock because that package recycles colMeans(y) incorrectly. pls4all matches this NumPy reference for q == 1 at IEEE round-off.

  • 📐 ref.r_multiblock (R · r) — multiblock 0.8.10 · strict (rmse_rel ≤ 1e-06) — R multiblock::rosa 0.8.10 (Liland, Næs & Indahl 2016). ROSA’s greedy block-selection-per-component may diverge from pls4all’s ordering — tolerance widened.

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 2e-167.07 ms
Python · archived pls4all benchmark
pls4all.python✓ bind2.41 ms
pls4all.sklearn✓ bind2.56 ms
R · archived pls4all benchmark
pls4all.R✓ bind5.46 ms
pls4all.R.formula✓ bind6.38 ms
pls4all.R.mdatools✓ bind6.80 ms
pls4all.R.pls✓ bind6.68 ms
Python · external
📐ref.python_numpysource1.43 ms🏆
R · external
📐ref.r_multiblock⇄ +1e-152.9 s
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 2e-161.24 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind1.36 ms
pls4all.sklearn✓ bind1.42 ms
R · archived pls4all benchmark
pls4all.R✓ bind3.82 ms
pls4all.R.formula✓ bind4.80 ms
pls4all.R.mdatools✓ bind5.17 ms
pls4all.R.pls✓ bind4.86 ms
Python · external
📐ref.python_numpysource6.48 ms
R · external
📐ref.r_multiblock⇄ +1e-151.8 s
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref 2e-161.33 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ bind1.99 ms
pls4all.sklearn✓ bind1.42 ms
R · archived pls4all benchmark
pls4all.R✓ bind4.13 ms
pls4all.R.formula✓ bind4.17 ms
pls4all.R.mdatools✓ bind23.1 ms
pls4all.R.pls✓ bind15.6 ms
Python · external
📐ref.python_numpysource6.60 ms
R · external
📐ref.r_multiblock⇄ +1e-152.2 s

See also: benchmark overview · methods index · interactive dashboard