I am using a tidymodels workflow with a custom recipe to tune multiple models. These models are then fed into tidymodels/stacks for blending and fitting. For example:
# Create the base stacked model
stacked_models <-
stacks() %>%
add_candidates(tuned_model)
# Blend all of the model components
blended_stack <-
stacked_models %>%
blend_predictions(
control = tune::control_grid(allow_par = TRUE))
# Produce the Final Stacked Model
fit_stacked_model <-
blended_stack %>%
fit_members()
When predicting on the fit_stacked_model
object, does the testing data need to be prep()
and bake()
prior to predicting, or does stacks
account for that in the backend?