Description Usage Arguments Details Value Author(s) Examples
This function iterates all combinations of preprocessing steps and spectral
region subsets, fitting PLS models for each, and ranks the resulting models
according to the Root Mean Squared Error of Prediction (or CV for cross
validation). This process informs the selection of parameters for fitting
PLS models with the function calibrate()
. The function also
determines the rank (number of latent vectors) that is optimal for each
model.
1 2 |
component |
A vector of y-values. One for each spectrum. |
spectra |
An object of class |
training_set |
A logical vector of |
parallel |
Logical. The default is |
region_list |
A list, where each element is a vector of length 2, specifying the range (max/min) of a spectral region to select. Should be in the same units as your spectra (e.g., wavenumbers). |
preprocessing_list |
A list, where each element is either (1) a single
character string specifying a preprocessing step or (2) a vector of length 2
specifying a series of preprocessing steps to be applied together. See
documentation for |
max_comps |
What is the maximum number of latent vectors to possibly include in the PLS regression. An integer. |
By default the spectral regions are defined in wavenumbers as list(c(9400,7500), c(7500,6100), c(6100,5450), c(5450,4600), c(4600,4250)).
Returns an object of class PLSopt
. The object is a list
containing the optimization results. See the following:
optimization_results - a data.frame containing the RMSEP for each
combination of preprocessing and subsetting tested
param_subsets - a list
of regions tried
param_preproc - a list of preprecessing steps tried.
Daniel M Griffith
1 | # See main leaf.spec-package example.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.