Creates a preprocessing constructor for applying Standard Normal Variate
(SNV) normalisation to spectral data. The constructor is intended to be
passed to preprocess_recipe and executed via process.
Value
An object of class preprocessing to be used in
preprocess_recipe and executed by process.
Details
SNV normalises each spectrum row-wise by subtracting its mean and dividing by its standard deviation:
\[SNV_i = \frac{x_i - \bar{x}_i}{s_i}\]
where \(x_i\) is the signal of the \(i\)th observation,
\(\bar{x}_i\) is its mean and \(s_i\) its standard
deviation. Implemented via standardNormalVariate.
References
Barnes RJ, Dhanoa MS, Lister SJ. 1989. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra. Applied spectroscopy, 43(5): 772-777.
Examples
data("NIRcannabis")
X <- NIRcannabis$spc
snv <- prep_snv()
recipe <- preprocess_recipe(snv)
X_snv <- process(X, recipe)
