20.2 Ensembling with stacks!

https://stacks.tidymodels.org/articles/basics.html

Model stacking process:

  1. Define some models, using all the knowledge we have from this book. We call them candidate models/members.
  2. Initialize the ensemble with stacks::stacks(), and add the members to it, using stacks::add_members()
  3. Blend the predictions of the members, using stacks::blend_predictions() (linear combination of each member’s predictions)
  4. Now that we know how to blend members, fit the members one more time on the whole training set, and predict on testing set.