Create multiple tidymodels workflows for H3-based SDMs
Source:R/h3sdm_workflows.R
h3sdm_workflows.Rd
Takes a named list of tidymodels
model specifications and a prepared recipe,
returning a list of workflows ready for fitting or cross-validation. Useful for
comparing multiple models for species distribution modeling with H3 hexagonal grids.
Arguments
- model_specs
A named list of
tidymodels
model specifications (e.g.,logistic_reg()
,rand_forest()
,boost_tree()
).- sdm_recipe
A
tidymodels
recipe object, typically created withh3sdm_recipe()
.
Examples
if (FALSE) { # \dontrun{
# Create model specifications
mod_log <- logistic_reg() %>% set_mode("classification") %>% set_engine("glm")
mod_rf <- rand_forest() %>% set_mode("classification") %>% set_engine("ranger")
model_list <- list(logistic = mod_log, rf = mod_rf)
# Prepare recipe
my_recipe <- h3sdm_recipe(combined_data)
# Create multiple workflows
workflows <- h3sdm_workflows(model_specs = model_list, sdm_recipe = my_recipe)
} # }