Examples of model functions that can be used in cross_validate_fn(). They can either be used directly or be starting points.
The update_hyperparameters() function updates the list of hyperparameters with default values for missing hyperparameters. You can also specify required hyperparameters.
model_functions(name)
Arguments
name: Name of model to get model function for, as it appears in the following list:
Name
Function
Hyperparameters (default)
"lm"
stats::lm()
"lmer"
lme4::lmer()
REML (FALSE)
"glm_binomial"
stats::glm()
"glmer_binomial"
lme4::glmer()
"svm_gaussian"
e1071::svm()
kernel ("radial") , cost (1)
"svm_binomial"
e1071::svm()
kernel ("radial") , cost (1)
"svm_multinomial"
e1071::svm()
kernel ("radial") , cost (1)
"naive_bayes"
e1071::naiveBayes()
laplace (0)
Returns
A function with the following form:
function(train_data, formula, hyperparameters) {
``# Return fitted model object
}
See Also
Other example functions: predict_functions(), preprocess_functions(), update_hyperparameters()