pp_snv — Standard normal variate (SNV)¶
Group: Preprocessing · C ABI: n4m_transform_snv_*
Description¶
Standard Normal Variate normalisation.
Parameters¶
Name |
Type |
Default |
|---|---|---|
|
|
|
|
|
|
|
|
|
API and bindings¶
C ABI (ABI 2): n4m_transform_snv_create · n4m_transform_snv_destroy · n4m_transform_snv_transform. Use the linked public header for the exact signature, configuration, and result handles.
Python (verified public re-export):
from n4m.transform.scatter import SNV
Source signature: SNV(with_mean: bool = True, with_std: bool = True, ddof: int = 0).
R (source-verified): snv_transform(X, with_mean = TRUE, with_std = TRUE, ddof = 0L).
library(n4m)
result <- snv_transform(X)
MATLAB / Octave (source-verified): snv_transform(X, varargin).
addpath('bindings/matlab')
result = n4m.snv_transform(X);
Explanations¶
Bibliographic source¶
Barnes, Dhanoa & Lister (1989), Standard Normal Variate Transformation and De-trending of Near-Infrared Diffuse Reflectance Spectra, Applied Spectroscopy 43, 772–777, https://doi.org/10.1366/0003702894202201.
Mathematical principle¶
Each spectrum is independently centered and scaled: \(x'_i=(x_i-\bar{x}_i)/s_i\), with optional centering, scaling, and configurable ddof. Row statistics make the transform stateless across samples.
Appropriate uses¶
Reducing additive and multiplicative scatter caused by particle size or optical path variation in diffuse-reflectance spectra.
Limits and validation¶
Near-constant spectra have unstable scale, and SNV removes absolute row amplitude that may contain analyte information. It does not remove wavelength-dependent baselines.
Implementation¶
n4m.transform.scatter.SNV wraps n4m_transform_snv_*; row mean/variance and flags are in preprocessing/scatter/snv.c.
The ABI-2 implementation is the n4m_transform_snv_* lifecycle in libn4m.
Sources and provenance¶
https://doi.org/10.1366/0003702894202201; https://github.com/GBeurier/nirs4all-methods/blob/main/cpp/src/core/preprocessing/scatter/snv.c
See also: methods index · interactive dashboard