variable_select_vip — VIP (Variable Importance in Projection)¶
Group: Variable selector · Registry tolerance: 1e-06
Description¶
VIP top-k variable selection (§18 Phase 5a, method=0)
Registry note — R
plsVarSel::VIPonpls::plsr(method='kernelpls', scale=FALSE). pls4all pins the matching solver (Solver.KERNEL_ALGORITHM,scale_x=False,scale_y=False) andcompute_vip_scoresimplements the same column-normalised W formula, so the selected-index masks agree bit-for-bit (max_abs=0).
Parameters¶
Name |
Type |
Default |
Notes |
|---|---|---|---|
|
|
|
current public binding signature |
|
|
|
current public binding signature |
|
|
|
current public binding signature |
Explanations¶
Bibliographic source¶
Wold, S., Sjöström, M. & Eriksson, L. (2001). PLS-regression: a basic tool of chemometrics. Chemometrics and Intelligent Laboratory Systems 58(2), 109–130. Verified primary link: https://doi.org/10.1016/S0169-7439(01)00155-1.
Mathematical principle¶
VIP scores quantify each feature’s contribution across all \(k\) latent components of a PLS model, weighted by how much each component explains of \(\mathbf{y}\): \(\mathrm{VIP}_j = \sqrt{\frac{p}{\mathrm{SSY}} \sum_{a=1}^{k} w_{ja}^2 \, \mathrm{SSY}_a}\), where \(w_{ja}\) is the loading weight of feature \(j\) in component \(a\) and \(\mathrm{SSY}_a\) is the explained sum of squares of \(\mathbf{y}\) in component \(a\).
The normalisation guarantees \(\sum_j \mathrm{VIP}_j^2 = p\), so the heuristic \(\mathrm{VIP}_j > 1\) identifies features contributing more than their fair share. VIP is the workhorse of spectroscopic variable selection — simple, deterministic, fast, and well understood.
Appropriate uses¶
Ranking wavelengths by their aggregate contribution to response-oriented PLS components.
Limits and validation¶
VIP is model-dependent and correlated variables can share or exchange importance; a threshold of one is heuristic.
Implementation¶
n4m_feature_selection_variable_select_rank with metric=VIP. Reference: R plsVarSel 0.10.0.
Sources and provenance¶
Current implementation: cpp/src/core/variable_selection.cpp.
API and bindings¶
C ABI (ABI 2): n4m_feature_selection_variable_select_rank. Use the linked public header for the exact signature, configuration, and result handles.
Python (verified public re-export):
from n4m.feature_selection.ranking import VariableSelect
Source signature: VariableSelect(top_k: int, *, n_components: int = 2, rank_method: int = 0) (n4m/_impl/selection.py).
R: no current source-verified entry point was found for this catalog method.
MATLAB / Octave: no current source-verified entry point was found for this catalog method.
Registry parity references 📐
📐
ref.r_plsvarsel(R · r) —plsVarSel0.10.0 · strict (rmse_rel ≤ 1e-06) — RplsVarSel::VIPranking onpls::plsr(method='kernelpls', scale=FALSE)— matches the pls4all kernel-PLS path used by_variable_select_rank_pls4all(rank_method=0). The top-k indices are returned (1-based -> 0-based in the loader).
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 | 2.55 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 2.47 ms |
pls4all.sklearn | ✓ J 1.00 | 1.97 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ J 1.00 | 6.19 ms |
pls4all.R.formula | ✓ J 1.00 | 6.51 ms |
pls4all.R.mdatools | ✓ J 1.00 | 6.61 ms |
pls4all.R.pls | ✓ J 1.00 | 5.86 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 16.2 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 8.22 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 7.47 ms |
pls4all.sklearn | ✓ J 1.00 | 2.74 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ J 1.00 | 25.1 ms |
pls4all.R.formula | ✓ J 1.00 | 11.1 ms |
pls4all.R.mdatools | ✓ J 1.00 | 9.03 ms |
pls4all.R.pls | ✓ J 1.00 | 17.2 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 18.5 ms |
| Backend | Parity | 200×40 (ms) |
|---|---|---|
| C++ native · libn4m | ||
pls4all.cpp.blas+omp | ✓ J 1.00 | 4.22 ms |
| Python · archived pls4all benchmark | ||
pls4all.python | ✓ J 1.00 | 4.15 ms |
pls4all.sklearn | ✓ J 1.00 | 3.66 ms🏆 |
| R · archived pls4all benchmark | ||
pls4all.R | ✓ J 1.00 | 5.24 ms |
pls4all.R.formula | ✓ J 1.00 | 6.31 ms |
pls4all.R.mdatools | ✓ J 1.00 | 6.76 ms |
pls4all.R.pls | ✓ J 1.00 | 6.29 ms |
| R · external | ||
📐ref.r_plsvarsel | source | 12.5 ms |
See also: benchmark overview · methods index · interactive dashboard