Fit multiple workflows for model stacking
Source:R/h3sdm_fit_models_stack.R
h3sdm_fit_models_stack.Rd
Fits a set of tidymodels workflows using resampling with fit_resamples()
and control_stack_resamples()
to generate objects suitable for stacking.
For each workflow, both the resampled model (cv_model
) and the original
workflow are returned. This is intended as a helper function for creating
ensembles of multiple models in the h3sdm
workflow.
Arguments
- wfs
A named list of tidymodels workflows. Each element should be a workflow object.
- scv
A resampling object, e.g., generated by
rsample::vfold_cv()
.- datos_presencia
A data frame containing the data to fit the workflows on.