Description Usage Arguments Value
Helper function for fit_gam()
& fit_loess()
. Determines
optimal value of k
basis functions for Generalized Additive Model
fits or span
for loess fits from among user-defined choices,
using a 10-fold cross validation minimizing mean squared error.
1 | crossValFit(rts, fit, vals, bs, family, m, method, optimizer, loess.pars, ...)
|
rts |
data.frame of ordered pair retention times |
fit |
Either "gam" for GAM fits, or "loess" for loess fits |
vals |
numeric vector: k values for GAM fits, spans for loess fits. Best value chosen by 10-fold cross validation. |
bs |
character. Choice of spline method, either "bs" or "ps" |
family |
character. Choice of mgcv family; see: ?mgcv::family.mgcv |
m |
integer. Basis and penalty order for GAM; see ?mgcv::s |
method |
character. Smoothing parameter estimation method; see: ?mgcv::gam |
optimizer |
character. Method to optimize smoothing parameter; see: ?mgcv::gam |
loess.pars |
parameters for LOESS fitting; see ?loess.control |
... |
Other arguments passed to |
Optimal parameter value as determined by 10-fold cross validation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.