variable_select_coef — Coefficient-magnitude selection

Group: Variable selector · Registry tolerance: 1.1

Description

|Coef| top-k selection (§18 Phase 5a, method=1)

Registry note — R pls::plsr(method='simpls') |coef| ranking. The solver mismatch is fixed, but residual top-k drift remains because pls4all ranks its stored C-kernel coefficient vector while R reconstructs coefficients through pls’s SIMPLS convention. Mask RMSE-rel ~0=perfect, ~1=half disagree, ~1.41=disjoint; tolerance accepts this known coefficient-convention divergence.

Parameters

Name

Type

Default

Notes

n_components

int

4

registry benchmark cell value

top_k

int

10

registry benchmark cell value

Explanations

Bibliographic source

Martens, H. & Næs, T. (1989). Multivariate Calibration, §5. — the simplest ranking baseline. Verified primary catalogue: https://search.worldcat.org/title/Multivariate-calibration/oclc/19847282.

Mathematical principle

Rank features by the absolute magnitude of their PLS regression coefficient \(|b_j|\) in the original feature scale. Pick the top-\(k\) as the selected subset.

This is the simplest possible PLS variable selector. It is biased — features with large variance get smaller coefficients for the same predictive effect — so it should usually be applied after autoscaling to remove the variance-induced bias. Once autoscaled, \(|b_j|\) ranks features by their standardised partial effect on \(y\), which is statistically meaningful.

Useful as a sanity-check baseline against more sophisticated selectors. If a complex method does not beat coefficient-magnitude selection, it is probably over-engineered.

Appropriate uses

Screening variables by fitted PLS coefficient magnitude when a compact linear predictor is desired.

Limits and validation

Coefficient magnitude depends on variable scaling and is unstable among correlated wavelengths.

Implementation

n4m_feature_selection_variable_select_rank with metric=COEF.

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: 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: 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_pls (R · r) — pls 2.8.5 · qualitative (rmse_rel ≤ 1e+00) — R pls::plsr coefficient magnitudes — top-k indices ranked by |coef|. Mirrors method=1 of pls4all’s ranker.

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 ≤ 1e+00 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.56 ms🏆
Python · archived pls4all benchmark
pls4all.python✓ J 1.001.61 ms
pls4all.sklearn✓ J 1.002.87 ms
R · archived pls4all benchmark
pls4all.R✓ J 1.0015.0 ms
pls4all.R.formula✓ J 1.009.19 ms
pls4all.R.mdatools✓ J 1.0018.1 ms
pls4all.R.pls✓ J 1.0017.2 ms
R · external
📐ref.r_plssource50.9 ms
BackendParity200×40 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ J 1.0011.3 ms
Python · archived pls4all benchmark
pls4all.python✓ J 1.006.88 ms🏆
pls4all.sklearn✓ J 1.007.62 ms
R · archived pls4all benchmark
pls4all.R✓ J 1.0016.9 ms
pls4all.R.formula✓ J 1.0018.4 ms
pls4all.R.mdatools✓ J 1.009.25 ms
pls4all.R.pls✓ J 1.0017.5 ms
R · external
📐ref.r_plssource16.3 ms
BackendParity200×40 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ J 1.001.87 ms
Python · archived pls4all benchmark
pls4all.python✓ J 1.002.60 ms
pls4all.sklearn✓ J 1.001.86 ms🏆
R · archived pls4all benchmark
pls4all.R✓ J 1.005.27 ms
pls4all.R.formula✓ J 1.006.03 ms
pls4all.R.mdatools✓ J 1.006.17 ms
pls4all.R.pls✓ J 1.006.23 ms
R · external
📐ref.r_plssource16.5 ms

See also: benchmark overview · methods index · interactive dashboard