wvc_threshold_select — WVC-threshold selection¶
Group: Variable selector · Registry tolerance: 1e-06
Description¶
WVC threshold-based selection (§18 Phase 5r)
Registry note — R
plsVarSel::WVC_plswith explicit median-scaled threshold. Default_wvc_threshold_select_pls4allpath mirrors the same R call, giving bit-exact mask parity. The C++ min-selected 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 |
Explanations¶
Bibliographic source¶
Andries, J. P. M. & Vander Heyden, Y. (2011). Improved variable reduction in partial least squares modelling based on predictive-property-ranked variables and adaptation of partial least squares complexity. Analytica Chimica Acta 705(1–2), 292–305. https://doi.org/10.1016/j.aca.2011.06.037 — same paper as wvc_select; introduces both the top-\(k\) ranking and the threshold / factor-of-mean rules used here.
Mathematical principle¶
After WVC scores are computed, the implementation uses one cutoff: the larger of score_threshold and threshold_factor times the mean score. Variables meeting it are retained, with the largest scores added if fewer than min_selected survive.
Appropriate uses¶
Applying an explicit cutoff to WVC scores for a compact selected set.
Limits and validation¶
One cutoff max(score_threshold, threshold_factor*mean_score) is used, with a min_selected fallback; no competing-rule CV selection is performed.
Implementation¶
The routine does not compare two thresholding rules by cross-validation. Any predictive validation of the chosen cutoff must be performed by the caller.
Sources and provenance¶
Current implementation: cpp/src/core/wvc_selection.cpp.
API and bindings¶
C ABI (ABI 2): n4m_feature_selection_wvc_threshold_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 WVCThreshold
Source signature: WVCThreshold(*, n_components: int = 2, normalize: bool = True, score_threshold: float = 0.0, threshold_factor: float = 1.0, min_selected: int | None = None) (n4m/_impl/selection.py).
R (source-verified): wvc_threshold_select(X, Y, n_components, normalize = TRUE, threshold = 0.0, threshold_factor = 1.0, min_selected = 1L).
The source signature has additional required inputs, so no example call is fabricated.
MATLAB / Octave (source-verified): wvc_threshold_select(X, Y, n_components, normalize, threshold, ... threshold_factor, min_selected).
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::WVC_plswith explicit threshold — picks features whose weighted-variable scores exceed the median × threshold-factor.
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 | 336.1 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 344.7 ms |
pls4all.sklearn | ⇄ J 0.69 | 1.67 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.69 | 4.07 ms |
pls4all.R.formula | ⇄ J 0.69 | 4.66 ms |
pls4all.R.mdatools | ⇄ J 0.69 | 4.59 ms |
pls4all.R.pls | ⇄ J 0.69 | 5.51 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 13.0 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 304.2 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 301.0 ms |
pls4all.sklearn | ⇄ J 0.69 | 1.57 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.69 | 4.31 ms |
pls4all.R.formula | ⇄ J 0.69 | 4.42 ms |
pls4all.R.mdatools | ⇄ J 0.69 | 4.35 ms |
pls4all.R.pls | ⇄ J 0.69 | 4.40 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 12.7 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 340.2 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 329.0 ms |
pls4all.sklearn | ⇄ J 0.69 | 1.61 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ⇄ J 0.69 | 4.06 ms |
pls4all.R.formula | ⇄ J 0.69 | 4.70 ms |
pls4all.R.mdatools | ⇄ J 0.69 | 5.14 ms |
pls4all.R.pls | ⇄ J 0.69 | 5.45 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 13.5 ms |
See also: benchmark overview · methods index · interactive dashboard