Combines a model specification and a prepared recipe into a single tidymodels
workflow
suitable for species distribution modeling with H3 hexagonal grids.
Arguments
- model_spec
A
tidymodels
model specification (e.g.,logistic_reg()
,rand_forest()
, orboost_tree()
).- sdm_recipe
A
tidymodels
recipe object, typically created withh3sdm_recipe()
.
Value
A workflow
object ready to be used for model fitting with fit()
or cross-validation.
Examples
if (FALSE) { # \dontrun{
library(parsnip)
# Create model specification
my_model_spec <- logistic_reg() %>% set_mode("classification") %>% set_engine("glm")
# Prepare recipe
my_recipe <- h3sdm_recipe(combined_data)
# Create workflow
sdm_wf <- h3sdm_workflow(model_spec = my_model_spec, sdm_recipe = my_recipe)
} # }