|
|
@ -5,32 +5,62 @@ |
|
|
|
\alias{pls_ken_stone} |
|
|
|
\title{Calibration sampling, model tuning, and PLS regression} |
|
|
|
\usage{ |
|
|
|
fit_pls(spec_chem, response, variable = NULL, center = TRUE, scale = TRUE, |
|
|
|
evaluation_method = "test_set", validation = TRUE, |
|
|
|
split_method = "ken_stone", ratio_val = 1/3, ken_sto_pc = 2, pc, |
|
|
|
invert = TRUE, tuning_method = "resampling", |
|
|
|
resampling_method = "kfold_cv", cv = NULL, resampling_seed = 123, |
|
|
|
pls_ncomp_max = 20, ncomp_fixed = 5, print = TRUE, |
|
|
|
env = parent.frame()) |
|
|
|
|
|
|
|
pls_ken_stone(spec_chem, response, variable = NULL, center = TRUE, |
|
|
|
scale = TRUE, evaluation_method = "test_set", validation = TRUE, |
|
|
|
split_method = "ken_stone", ratio_val = 1/3, ken_sto_pc = 2, pc, |
|
|
|
invert = TRUE, tuning_method = "resampling", |
|
|
|
resampling_method = "kfold_cv", cv = NULL, resampling_seed = 123, |
|
|
|
pls_ncomp_max = 20, ncomp_fixed = 5, print = TRUE, |
|
|
|
env = parent.frame()) |
|
|
|
fit_pls( |
|
|
|
spec_chem, |
|
|
|
response, |
|
|
|
variable = NULL, |
|
|
|
center = TRUE, |
|
|
|
scale = TRUE, |
|
|
|
evaluation_method = "test_set", |
|
|
|
validation = TRUE, |
|
|
|
split_method = "ken_stone", |
|
|
|
ratio_val = 1/3, |
|
|
|
ken_sto_pc = 2, |
|
|
|
pc, |
|
|
|
invert = TRUE, |
|
|
|
tuning_method = "resampling", |
|
|
|
resampling_method = "kfold_cv", |
|
|
|
cv = NULL, |
|
|
|
resampling_seed = 123, |
|
|
|
pls_ncomp_max = 20, |
|
|
|
ncomp_fixed = 5, |
|
|
|
print = TRUE, |
|
|
|
env = parent.frame() |
|
|
|
) |
|
|
|
|
|
|
|
pls_ken_stone( |
|
|
|
spec_chem, |
|
|
|
response, |
|
|
|
variable = NULL, |
|
|
|
center = TRUE, |
|
|
|
scale = TRUE, |
|
|
|
evaluation_method = "test_set", |
|
|
|
validation = TRUE, |
|
|
|
split_method = "ken_stone", |
|
|
|
ratio_val = 1/3, |
|
|
|
ken_sto_pc = 2, |
|
|
|
pc, |
|
|
|
invert = TRUE, |
|
|
|
tuning_method = "resampling", |
|
|
|
resampling_method = "kfold_cv", |
|
|
|
cv = NULL, |
|
|
|
resampling_seed = 123, |
|
|
|
pls_ncomp_max = 20, |
|
|
|
ncomp_fixed = 5, |
|
|
|
print = TRUE, |
|
|
|
env = parent.frame() |
|
|
|
) |
|
|
|
} |
|
|
|
\arguments{ |
|
|
|
\item{spec_chem}{Tibble that contains spectra, metadata and chemical |
|
|
|
reference as list-columns. The tibble to be supplied to \code{spec_chem} can |
|
|
|
be generated by the `join_chem_spc() function`} |
|
|
|
be generated by the \verb{join_chem_spc() function}} |
|
|
|
|
|
|
|
\item{response}{Response variable as symbol or name |
|
|
|
(without quotes, no character string). The provided response symbol needs to be |
|
|
|
a column name in the \code{spec_chem} tibble.} |
|
|
|
|
|
|
|
\item{variable}{Depreciated and replaced by `response`} |
|
|
|
\item{variable}{Depreciated and replaced by \code{response}} |
|
|
|
|
|
|
|
\item{center}{Logical whether to perform mean centering of each spectrum column |
|
|
|
(e.g. wavenumber or wavelength) after common spectrum preprocessing. Default is |
|
|
@ -66,7 +96,7 @@ Kennard-Stone algorithm. |
|
|
|
Default is \code{ken_sto_pc = 2}, which will use the first two PCA |
|
|
|
components.} |
|
|
|
|
|
|
|
\item{pc}{Depreciated; renamed argument is `ken_sto_pc`.} |
|
|
|
\item{pc}{Depreciated; renamed argument is \code{ken_sto_pc}.} |
|
|
|
|
|
|
|
\item{invert}{Logical} |
|
|
|
|
|
|
|