I have a problem with Ensemble modeling.
I did the following which works fine:
prep <- list(none = recipe)
mod <- list( lm_model, _model)
ens <- workflow_set(prep, mod, cross = T)
ens_fit <- workflow_map("tune_grid", resamples = fold, grid = 10, metrics = metric_set(rmse), verbose = TRUE )
What does not work is:
finalize_workflow(ens_fit) |> predict(new_data)
Where is the problem please? it seems that i'm not able to select the best fit from ensemble to plug it for prediction. Please notice that i'm not interested in selecting the best model inside but i'm interested in a blend modeling like ensemble() ou starck() if any one can produce a reprex from data to predict.
Thank you!
My concern is simple: i see several example with Ensemble() to do an average of ml models but when i read the code, i see not the mean of model weight but a max function to select the best ml model. I would like an example with an ensemble model computing the average of ml if possible. Thank you.