rep_select — REP — Recursive Elimination of Predictors¶
Group: Variable selector · Registry tolerance: 1e-06
Description¶
REP-PLS repeated VIP selection (§18 Phase 5s)
Registry note — R
plsVarSel::rep_plsrepeated VIP-filtered selection. Default_rep_select_pls4allpath mirrors the same R call with seed=11, giving bit-exact mask parity. The C++ step-count backward-elimination kernel is opt-in vialegacy=True.
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
|
|
|
registry benchmark cell value |
Explanations¶
Bibliographic source¶
Mehmood, T., Liland, K. H., Snipen, L. & Sæbø, S. (2012). A review of variable selection methods in partial least squares regression. Chemometrics and Intelligent Laboratory Systems 118, 62–69. https://doi.org/10.1016/j.chemolab.2012.07.010 — same review as shaving_select; §3.3 Recursive elimination introduces the fixed-count variant implemented here.
Mathematical principle¶
REP removes a fixed count of features per recursive step (rather than a fraction as in shaving). At each step, sort features by absolute coefficient score, remove the \(m\) lowest, refit, record CV-RMSE. Return the subset with lowest CV-RMSE across all retained trajectories.
Useful when the analyst wants control over total iteration count: with \(m\) features removed per step, the process terminates in \(\lceil p / m \rceil\) iterations. Same intent as shaving but with linear instead of geometric decay.
Appropriate uses¶
Iterative elimination based on regression-coefficient-derived variable importance for parsimonious calibration.
Limits and validation¶
Coefficient rankings inherit scaling and collinearity sensitivity, and repeated validation queries can bias model choice.
Implementation¶
n4m_feature_selection_rep_select.
Sources and provenance¶
Current implementation: cpp/src/core/rep_selection.cpp.
API and bindings¶
C ABI (ABI 2): n4m_feature_selection_rep_select. Use the linked public header for the exact signature, configuration, and result handles.
Python (verified public re-export):
from n4m.feature_selection.wrapper import REP
Source signature: REP(*, n_components: int = 2, n_steps: int = 10, min_features: int | None = None, remove_count: int = 1, n_folds: int = 3) (n4m/_impl/selection.py).
R (source-verified): rep_select(X, Y, n_components, n_steps = 10L, min_features = 5L, remove_count = 1L).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): rep_select(X, Y, n_components, n_steps, min_features, remove_count).
The source signature has additional required inputs, so no example call is fabricated.
Registry parity references 📐
📐
ref.r_plsvarsel(R · r) —plsVarSel0.10.0 · strict (rmse_rel ≤ 1e-06) — RplsVarSel::rep_pls— repeated VIP-thresholded variable selection.
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 | 605.7 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 588.4 ms |
pls4all.sklearn | ⇄ J 0.21 | 3.35 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.21 | 5.16 ms |
pls4all.R.formula | ⇄ J 0.21 | 6.34 ms |
pls4all.R.mdatools | ⇄ J 0.21 | 6.53 ms |
pls4all.R.pls | ⇄ J 0.21 | 6.07 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 241.7 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 589.6 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 594.0 ms |
pls4all.sklearn | ⇄ J 0.21 | 2.18 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.21 | 5.01 ms |
pls4all.R.formula | ⇄ J 0.21 | 5.61 ms |
pls4all.R.mdatools | ⇄ J 0.21 | 5.95 ms |
pls4all.R.pls | ⇄ J 0.21 | 5.87 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 239.4 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 611.9 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 630.6 ms |
pls4all.sklearn | ⇄ J 0.21 | 2.24 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.21 | 4.92 ms |
pls4all.R.formula | ⇄ J 0.21 | 6.09 ms |
pls4all.R.mdatools | ⇄ J 0.21 | 5.95 ms |
pls4all.R.pls | ⇄ J 0.21 | 5.79 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 246.5 ms |
See also: benchmark overview · methods index · interactive dashboard