wvc_select — WVC — Weighted Variable Contribution

Group: Variable selector · Registry tolerance: 0.7

Description

WVC weighted-variable-component top-k

Registry note — R plsVarSel::WVC_pls top-k weighted-variable scoring. Mask RMSE-rel ~0=perfect, ~1=half disagree, ~1.41=disjoint; tolerance 0.7 enforces ~50% overlap.

Parameters

Name

Type

Default

Notes

top_k

int

required

current public binding signature

n_components

int

2

current public binding signature

normalize

bool

True

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. Verified primary link: https://doi.org/10.1016/j.aca.2011.06.037.

Mathematical principle

The code runs sequential PLS1/NIPALS: for each component it normalizes \(w=X^\top y\), forms \(t=Xw\), estimates loadings, and accumulates score/residual energy terms. For feature \(j\), WVC is \(\sqrt{p\sum_a ee_a w_{ja}^2 ss_a / \sum_a ee_a ss_a}\), optionally normalized before returning the top_k scores. No singular-value decomposition or cross-validation occurs in this selector.

Appropriate uses

Ranking wavelengths by the shipped weighted variable-contribution score across sequential PLS1 components.

Limits and validation

The implementation uses PLS weights, score energy, and residual energy; it performs no SVD and should not be interpreted as a singular-value criterion.

Implementation

cpp/src/core/wvc_selection.cpp implements the PLS1 weight/score/loading loop and its cumulative WVC formula. Treat the ranking as an implementation-specific component contribution; the threshold selector is a separate method with its own cutoff rule.

Sources and provenance

Current implementation: cpp/src/core/wvc_selection.cpp.

API and bindings

C ABI (ABI 2): n4m_feature_selection_wvc_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 WVC

Source signature: WVC(top_k: int, *, n_components: int = 2, normalize: bool = True) (n4m/_impl/selection.py).

R (source-verified): wvc_select(X, Y, n_components, top_k = 10L, normalize = TRUE).

The source signature has additional required inputs, so no example call is fabricated.

MATLAB / Octave (source-verified): wvc_select(X, Y, n_components, top_k, normalize).

The source signature has additional required inputs, so no example call is fabricated.

Registry parity references 📐

  • 📐 ref.r_plsvarsel (R · r) — plsVarSel 0.10.0 · qualitative (rmse_rel ≤ 7e-01) — R plsVarSel::WVC_pls — weighted-variable-component scoring.

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: qualitative — shape/smoke comparison only. The external library and archived benchmark harness do not produce numerically equivalent output for this method (see the MethodSpec notes); the rmse_rel_tol ≤ 7e-01 budget is set wide on purpose. Treat ~ shape as “we ran both, both finished”, not as numerical agreement.

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.

BackendParity200×40 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ J 1.001.49 ms
Python · archived pls4all benchmark
pls4all.python✓ J 1.001.48 ms🏆
pls4all.sklearn✓ J 1.001.63 ms
R · archived pls4all benchmark
pls4all.R✓ J 1.004.23 ms
pls4all.R.formula✓ J 1.004.97 ms
pls4all.R.mdatools✓ J 1.005.30 ms
pls4all.R.pls✓ J 1.005.72 ms
R · external
📐ref.r_plsvarselsource14.4 ms
BackendParity200×40 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ J 1.001.55 ms
Python · archived pls4all benchmark
pls4all.python✓ J 1.001.53 ms🏆
pls4all.sklearn✓ J 1.001.65 ms
R · archived pls4all benchmark
pls4all.R✓ J 1.004.24 ms
pls4all.R.formula✓ J 1.004.92 ms
pls4all.R.mdatools✓ J 1.005.18 ms
pls4all.R.pls✓ J 1.005.28 ms
R · external
📐ref.r_plsvarselsource13.0 ms
BackendParity200×40 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ J 1.001.50 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ J 1.002.65 ms
pls4all.sklearn✓ J 1.001.68 ms
R · archived pls4all benchmark
pls4all.R✓ J 1.004.88 ms
pls4all.R.formula✓ J 1.006.13 ms
pls4all.R.mdatools✓ J 1.005.79 ms
pls4all.R.pls✓ J 1.005.46 ms
R · external
📐ref.r_plsvarselsource13.8 ms

See also: benchmark overview · methods index · interactive dashboard