Main functions
The main functions of cvms are:
cross_validate()
cross_validate_fn()
validate()
evaluate()
baseline()
combine_predictors()
cv_plot()
select_metrics()
reconstruct_formulas()
The difference between cross_validate()
and cross_validate_fn()
Originally, cvms
only provided the option to cross-validate Gaussian and binomial regression models, fitting the models internally with the lm()
, lmer()
, glm()
, and glmer()
functions. The cross_validate()
function has thus been designed specifically to work with those functions.
To allow cross-validation of custom model functions like support-vector machines, neural networks, etc., the cross_validate_fn()
function has been added. You provide a model function and (if defaults fail) a predict function, and it does the rest (see examples below).