20.2 Ensembling with stacks
!
https://stacks.tidymodels.org/articles/basics.html
Model stacking process:
- Define some models, using all the knowledge we have from this book. We call them candidate models/members.
- Initialize the ensemble with
stacks::stacks()
, and add the members to it, usingstacks::add_members()
- Blend the predictions of the members, using
stacks::blend_predictions()
(linear combination of each member’s predictions) - Now that we know how to blend members,
fit
the members one more time on the whole training set, andpredict
on testing set.