interval_select — iPLS — Interval PLS (moving-window)¶
Group: Variable selector · Registry tolerance: 1e-06
Description¶
Interval/iPLS forward selection (§18 Phase 5b)
Registry note — R
mdatools::ipls(method='forward'). Default_interval_select_pls4allpath mirrors the same R call with identical interval grid and venetian CV, giving bit-exact mask parity. The C++ contiguous-fold kernel is opt-in vialegacy=True.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
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. Verified primary link: https://doi.org/10.1366/0003702001949500.
Mathematical principle¶
Slide a fixed-width window of \(w\) consecutive wavelengths across the spectrum, fit PLS on each window alone, evaluate by CV-RMSE. The window with the lowest CV-RMSE is returned as the selected interval.
iPLS is the simplest interval selector — it returns a single contiguous band rather than scattered wavelengths. The output is therefore directly interpretable as a spectroscopic feature (functional group, electronic transition, …). For multi-band selection use biPLS or siPLS.
The window width \(w\) is the main tunable; cross-validating \(w\) jointly with the window position is the standard extension.
Appropriate uses¶
Selecting contiguous spectral intervals when bands are expected to carry joint chemical information.
Limits and validation¶
The answer depends on interval partition and width; coarse boundaries can split or dilute informative peaks.
Implementation¶
n4m_feature_selection_interval_select. Reference: R plsVarSel.
Sources and provenance¶
Current implementation: cpp/src/core/interval_selection.cpp.
API and bindings¶
C ABI (ABI 2): n4m_feature_selection_interval_generator_create · n4m_feature_selection_interval_generator_destroy · n4m_feature_selection_interval_generator_fit · n4m_feature_selection_interval_generator_is_fitted · n4m_feature_selection_interval_generator_output_cols · n4m_feature_selection_interval_generator_transform · n4m_feature_selection_interval_select. Use the linked public header for the exact signature, configuration, and result handles.
Python (verified public re-export):
from n4m.feature_selection.interval import IntervalGenerator
Source signature: IntervalGenerator(interval_size: int = 32, step: int | None = None) (n4m/_impl/advanced.py).
R (source-verified): interval_select(X, Y, n_components, interval_width = 10L, step = 1L).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): interval_select(X, Y, n_components, interval_width, step).
The source signature has additional required inputs, so no example call is fabricated.
Registry parity references 📐
📐
ref.r_mdatools(R · r) —mdatools0.15.0 · strict (rmse_rel ≤ 1e-06) — Rmdatools::iplsforward-iPLS — returns the union of selected interval variables. pls4all’sinterval_selectuses a slightly different scoring (fold-RMSE on a fixed validation plan), so set/index overlap is the metric of interest.
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.
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 1.5 s |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 1.5 s |
pls4all.sklearn | ⇄ J 0.50 | 3.75 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.50 | 10.9 ms |
pls4all.R.formula | ⇄ J 0.50 | 11.7 ms |
pls4all.R.mdatools | ⇄ J 0.50 | 13.9 ms |
pls4all.R.pls | ⇄ J 0.50 | 10.3 ms |
| R · external | ||
📐ref.r_mdatools | source | 632.3 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 2.0 s |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 2.0 s |
pls4all.sklearn | ⇄ J 0.50 | 3.95 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.50 | 8.51 ms |
pls4all.R.formula | ⇄ J 0.50 | 9.33 ms |
pls4all.R.mdatools | ⇄ J 0.50 | 7.09 ms |
pls4all.R.pls | ⇄ J 0.50 | 9.36 ms |
| R · external | ||
📐ref.r_mdatools | source | 706.6 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 1.1 s |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 994.2 ms |
pls4all.sklearn | ⇄ J 0.50 | 2.26 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.50 | 5.63 ms |
pls4all.R.formula | ⇄ J 0.50 | 6.68 ms |
pls4all.R.mdatools | ⇄ J 0.50 | 6.61 ms |
pls4all.R.pls | ⇄ J 0.50 | 7.03 ms |
| R · external | ||
📐ref.r_mdatools | source | 507.0 ms |
See also: benchmark overview · methods index · interactive dashboard