approximate_press — PRESS by leave-one-out refitting¶
Group: Diagnostic · Registry tolerance: 1e-10
Description¶
Approximate-PRESS component selection (§29)
Registry note — R
pls::plsr(validation='LOO', method='simpls', scale=FALSE)$validation$PRESS. Default pls4all path runs true LOO PRESS over the same SIMPLS kernel and matches R bit-for-bit;cfg.approximate_press_legacy = 1falls back to the pre-0.97.4 Eastment-Krzanowski training-residual approximation.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
registry benchmark cell value |
Explanations¶
Bibliographic source¶
Allen, D. M. (1974). The relationship between variable selection and data augmentation and a method for prediction. Technometrics 16(1), 125–127. Verified primary link: https://doi.org/10.1080/00401706.1974.10489157.
Mathematical principle¶
The default path computes prediction residual error sums of squares by leaving out each observation, refitting PLS, and predicting the held-out row for every requested component count. This is direct LOO PRESS rather than a hat-matrix shortcut.
Appropriate uses¶
Selecting PLS component count from leave-one-out prediction error on small data sets.
Limits and validation¶
The default performs n refits for every component count and is expensive; legacy mode uses a constant k/n inflation, not individual hat diagonals.
Implementation¶
Cost scales with n refits per component count. The compatibility-only legacy branch avoids those refits with a constant k/n residual inflation; it does not calculate observation-specific leverage h_ii.
Sources and provenance¶
Current implementation: cpp/src/core/extra_pls.cpp.
API and bindings¶
C ABI (ABI 2): n4m_metrics_approximate_press_compute. 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): approximate_press(X, Y, max_components).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): approximate_press(X, Y, max_components).
The source signature has additional required inputs, so no example call is fabricated.
Registry parity references 📐
📐
ref.r_pls(R · r) —pls2.8.5 · strict (rmse_rel ≤ 1e-10) — Rpls::plsr(validation='LOO', method='simpls', scale=FALSE)$validation$PRESS. Default pls4all path runs true LOO PRESS over the same SIMPLS kernel and matches R bit-for-bit;cfg.approximate_press_legacy = 1falls back to the pre-0.97.4 Eastment-Krzanowski training-residual approximation.
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.
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 2e-15 | 28.4 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 28.1 ms |
pls4all.sklearn | ✓ bind | 28.1 ms |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ bind | 24.7 ms🏆 |
pls4all.R.formula | ✓ bind | 25.5 ms |
pls4all.R.mdatools | ✓ bind | 25.3 ms |
pls4all.R.pls | ✓ bind | 25.7 ms |
| R · external | ||
📐ref.r_pls | source | 69.5 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 2e-15 | 28.9 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 28.8 ms |
pls4all.sklearn | ✓ bind | 28.8 ms |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ bind | 24.9 ms🏆 |
pls4all.R.formula | ✓ bind | 25.2 ms |
pls4all.R.mdatools | ✓ bind | 25.5 ms |
pls4all.R.pls | ✓ bind | 25.4 ms |
| R · external | ||
📐ref.r_pls | source | 69.2 ms |
| Backend | Parity | 200×30 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ ref 2e-15 | 29.4 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ bind | 28.6 ms |
pls4all.sklearn | ✓ bind | 28.9 ms |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ bind | 24.5 ms🏆 |
pls4all.R.formula | ✓ bind | 25.0 ms |
pls4all.R.mdatools | ✓ bind | 24.9 ms |
pls4all.R.pls | ✓ bind | 25.2 ms |
| R · external | ||
📐ref.r_pls | source | 67.7 ms |
See also: benchmark overview · methods index · interactive dashboard