| prep_snv | R Documentation |
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.
prep_snv()
SNV normalises each spectrum row-wise by subtracting its mean and dividing by its standard deviation:
\mjdeqnSNV_i = \fracx_i - \barx_is_iSNV_i = (x_i - mean(x_i)) / sd(x_i)
where \mjeqnx_ix_i is the signal of the \mjeqniith observation,
\mjeqn\barx_i\barx_i is its mean and \mjeqns_is_i its standard
deviation. Implemented via standardNormalVariate.
An object of class preprocessing to be used in
preprocess_recipe and executed by process.
Leonardo Ramirez-Lopez with code from Antoine Stevens
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.
preprocess_recipe, process
data("proximateCannabis")
X <- proximateCannabis$spc
snv <- prep_snv()
recipe <- preprocess_recipe(snv)
X_snv <- process(X, recipe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.