# `sipls_select` — siPLS — Synergy Interval PLS _Group_: **Variable selector** · _Registry tolerance_: `0.7` · _Parity reference_: **paper-only** (Nørgaard, L., Saudland, A., Wagner, J., Nielsen, J. P., Munck, L. & Engelsen, S. B. (2000). Interval partial least-squares regression (iPLS). Appl. Spectrosc. 54(3), 413-419. (No widely installable R / Python port of siPLS' synergistic combinations; smoke-tested only.)) ## Description siPLS synergistic interval selection (§18 Phase 5q) From the `pls4all.sklearn.SiPLSSelector` docstring: > siPLS — synergistic interval combinations (Nørgaard 2000). ### Parameters | Name | Type | Default | Notes | |------|------|---------|-------| | `n_components` | `int` | `2` | Number of latent components extracted (k). | | `interval_width` | `int` | `10` | Width (in variables) of each contiguous spectral interval. | | `combination_size` | `int` | `2` | Number of intervals combined into the synergistic siPLS subset. | | `n_folds` | `int` | `3` | Number of cross-validation folds used inside the selector. | ## Explanations ### Bibliographic source Nørgaard, L., Saudland, A., Wagner, J., Nielsen, J. P., Munck, L. & Engelsen, S. B. (2000). *Interval partial least-squares regression (iPLS): a comparative chemometric study with an example from near-infrared spectroscopy*. Applied Spectroscopy 54(3), 413–419 — same paper as `interval_select`; siPLS is the synergy-combinations extension proposed in §3. ### Mathematical principle Exhaustively score every combination of $m$ fixed-size intervals (out of $I$ total) by CV-RMSE; return the best combination. This captures **synergy** — pairs (or triples) of intervals that work well together even if neither alone is the best single interval. Combinatorial cost is $\binom{I}{m}$ which is manageable only for small $m$ (typically $m \le 4$ with $I \le 20$, giving up to ~5000 combinations). For larger search spaces use biPLS or interval-GA. siPLS is the natural extension of iPLS when single-interval performance is unsatisfactory: it explicitly looks for complementary bands. ### Implementation `n4m_sipls_select`. Reference: R `plsVarSel`. ### Usage Every pls4all binding tab dispatches into the same C kernel; the external libraries listed at the bottom of the page are the parity references registered in `benchmarks.parity_timing.registry`. Switch tabs to read the same fit in your language. The R package now ships drop-in-compatible facades for the CRAN `pls` package (`plsr`, `pcr`, `mvr`) and for the `mdatools::pls(x, y, ...)` matrix idiom — those tabs appear only on the methods that have a meaningful equivalence. **pls4all bindings** ::::{tab-set} :class: pls4all-bindings :::{tab-item} C ABI · libn4m :sync: c :class-label: lang-c ```c /* C ABI — libn4m */ n4m_context_t* ctx = n4m_context_create(); n4m_config_t* cfg = n4m_config_create(); n4m_method_result_t* res = NULL; n4m_sipls_select_fit(ctx, cfg, &x_view, &y_view, /* hyperparams */, &res); /* … read coefficients / mask / scores via */ /* n4m_method_result_get_double_matrix / vector / scalar … */ n4m_method_result_destroy(res); n4m_config_destroy(cfg); n4m_context_destroy(ctx); ``` ::: :::{tab-item} Python · pls4all (raw) :sync: python-raw :class-label: lang-python ```python import pls4all from pls4all._methods import sipls_select_fit with pls4all.Context() as ctx, pls4all.Config() as cfg: res = sipls_select_fit(ctx, cfg, X, y, n_components=4) # then: res.matrix("predictions"), res.matrix("coefficients"), # res.vector("mask"), res.scalar("intercept"), … ``` ::: :::{tab-item} Python · pls4all.sklearn :sync: python-sklearn :class-label: lang-python ```python from pls4all.sklearn import SiPLSSelector mdl = SiPLSSelector(n_components=2, interval_width=10, combination_size=2, n_folds=3) mdl.fit(X, y) y_hat = mdl.predict(X_test) ``` ::: :::{tab-item} R · pls4all_method() :sync: r-dispatcher :class-label: lang-r ```r library(pls4all) # Unified low-level dispatcher (May 2026 R cleanup): res <- pls4all_method("sipls_select", X, y, n_components = 4L, params = list(interval_width = 5L, combination_size = 2L)) # res is a named list with MethodResult arrays/scalars. # selected_indices / top_k_intervals are 1-based. ``` ::: :::{tab-item} MATLAB · pls4all (MEX) :sync: matlab-mex :class-label: lang-matlab ```matlab res = pls4all.sipls_select(X, y, 4); % see header of bindings/matlab/+pls4all/sipls_select.m for full % parameter surface: % res = sipls_select(X, Y, n_components, interval_width, combination_size) yhat = predict(res, Xtest); ``` ::: :::{tab-item} MATLAB · pls4all (classdef) :sync: matlab-classdef :class-label: lang-matlab _No idiomatic classdef wrapper — invoke `pls4all.fit("sipls_select", X, y, …)` directly from the unified MEX factory._ ::: :::: **Registry parity references** 📐 :::{card} :class-card: external-refs - 📜 **Paper-only** — no executable parity reference; the `pls4all` implementation is verified by a smoke fit only. Canonical citation: Nørgaard, L., Saudland, A., Wagner, J., Nielsen, J. P., Munck, L. & Engelsen, S. B. (2000). Interval partial least-squares regression (iPLS). Appl. Spectrosc. 54(3), 413-419. (No widely installable R / Python port of siPLS' synergistic combinations; smoke-tested only.) ::: ### Benchmarks Adaptive wall-clock per cell measured against [`full_matrix.csv`](../benchmarks/overview.md). 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 = pls4all binding agrees with the C++ baseline  ·  ✗ divergent  ·  ⚠ error  ·  — not run. The fastest backend per column is marked 🏆. ::::{tab-set} :class: parity-tabs :::{tab-item} 1 thread :sync: threads-1
BackendParity50×250 (ms)100×50 (ms)100×500 (ms)100×2500 (ms)200×40 (ms)250×50 (ms)500×50 (ms)500×500 (ms)500×2500 (ms)2500×50 (ms)2500×500 (ms)2500×2500 (ms)10000×50 (ms)10000×500 (ms)
Python · pls4all
pls4all.python✓ bind20.7 ms🏆2.64 ms🏆5.35 ms
pls4all.sklearn✓ bind21.8 ms2.99 ms4.81 ms🏆
R · pls4all
pls4all.R✓ bind28.4 ms6.79 ms12.8 ms
pls4all.R.formula✓ bind35.3 ms7.58 ms10.5 ms
pls4all.R.mdatools✓ bind35.6 ms7.83 ms11.2 ms
pls4all.R.pls✓ bind37.0 ms7.70 ms12.0 ms
MATLAB · pls4all
pls4all.matlab✓ bind21.7 ms3.46 ms9.03 ms
pls4all.matlab.classdef✓ bind26.7 ms4.07 ms9.78 ms
::: :::{tab-item} 3 threads :sync: threads-3
BackendParity50×250 (ms)100×50 (ms)100×500 (ms)100×2500 (ms)200×40 (ms)250×50 (ms)500×50 (ms)500×500 (ms)500×2500 (ms)2500×50 (ms)2500×500 (ms)2500×2500 (ms)10000×50 (ms)10000×500 (ms)
Python · pls4all
pls4all.python✓ bind2.44 ms🏆
pls4all.sklearn✓ bind2.64 ms
R · pls4all
pls4all.R✓ bind6.17 ms
pls4all.R.formula✓ bind9.10 ms
pls4all.R.mdatools✓ bind7.35 ms
pls4all.R.pls✓ bind7.28 ms
MATLAB · pls4all
pls4all.matlab✓ bind3.36 ms
pls4all.matlab.classdef✓ bind5.87 ms
::: :::{tab-item} 10 threads :sync: threads-10
BackendParity50×250 (ms)100×50 (ms)100×500 (ms)100×2500 (ms)200×40 (ms)250×50 (ms)500×50 (ms)500×500 (ms)500×2500 (ms)2500×50 (ms)2500×500 (ms)2500×2500 (ms)10000×50 (ms)10000×500 (ms)
Python · pls4all
pls4all.python✓ bind4.20 ms
pls4all.sklearn✓ bind2.50 ms🏆
R · pls4all
pls4all.R✓ bind5.28 ms
pls4all.R.formula✓ bind6.22 ms
pls4all.R.mdatools✓ bind5.59 ms
pls4all.R.pls✓ bind6.13 ms
MATLAB · pls4all
pls4all.matlab✓ bind3.14 ms
pls4all.matlab.classdef✓ bind3.56 ms
::: :::: --- _See also_: [benchmark overview](../benchmarks/overview.md) · [methods index](index.md) · [interactive dashboard](../landing/dashboard.md)