---
title: "Discussion on \"Time Series Forecasting Lab (Part 6) - Stacked Ensembles\" | Hashnode"
description: "Discussion on \"Time Series Forecasting Lab (Part 6) - Stacked Ensembles\". Cover photo by Markus Spiske on Unsplash\nGo to R-bloggers for R news and tutorials contributed by hundreds of R bloggers.\nIntroduction\nThis is the sixth of a series of 6 articles about time series forecasting with panel data and ensemble stacking wit..."
url: "https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Time Series Forecasting Lab (Part 6) - Stacked Ensembles](https://blog.bguarisma.com/time-series-forecasting-lab-part-6-stacked-ensembles?utm_source=hashnode&utm_medium=feed)

Cover photo by Markus Spiske on Unsplash Go to R-bloggers for R news and tutorials contributed by hundreds of R bloggers. Introduction This is the sixth of a series of 6 articles about time series forecasting with panel data and ensemble stacking wit...

Jan 17, 2022 · 10 min read · blog.bguarisma.com  
Updated Jan 26, 2022  
Read the article

-   [#r](https://hashnode.com/tag/r)
-   [#machine-learning](https://hashnode.com/tag/machine-learning)

## Written by

[Boris Guarisma](https://hashnode.com/@bguarisma)

@bguarisma · Paris, France

  
[View profile](https://hashnode.com/@bguarisma)

Data Science, AI & Quantum Computing

Avec curiosité et humilité, je partage ici mes explorations en IA, data science et au-delà. Un carnet de bord pour apprendre, douter, comprendre — loin du buzz, proche du vrai.

## Responses 3

Markdown supported · ⌘↵ to post

[JG](https://hashnode.com/@TheGoat)

[Oct 28, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/635c6a4fb872be2ebe1eb828)

Hi [Boris Guarisma](https://hashnode.com/@bguarisma), thank you for a great tutorial, this is the most comprehensive guide to TS forecasting in R that I've come across. Is it possible for this code to be run on a spark cluster rather than locally? Thanks again.

[Simona Jokubauskaite](https://hashnode.com/@S1mona)

[Jan 25, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61f005a887fd2728e7cd34d6)

Hi, forecast\_stacking\_tbl is also missing.

[Simona Jokubauskaite](https://hashnode.com/@S1mona)

[Jan 25, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61f005a887fd2728e7cd34d6#reply-61f00a68e247b2151e61edc5)

[Boris Guarisma](https://hashnode.com/@bguarisma) but it is used in lapply before the bind\_rows.

[Boris Guarisma](https://hashnode.com/@bguarisma)

[Jan 26, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61f005a887fd2728e7cd34d6#reply-61f10d1f87fd2728e7cd51ef)

[Simona Jokubauskaite](https://hashnode.com/@S1mona) yes, my bad, I've skipped an important part, the article has been updated. It was my last article ... I was getting tired. Thanks !

[Simona Jokubauskaite](https://hashnode.com/@S1mona)

[Jan 28, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61f005a887fd2728e7cd34d6#reply-61f3e47c52c782474274a022)

[Boris Guarisma](https://hashnode.com/@bguarisma) Thanks for you great work! I really appreciate it :)

[John Rambo](https://hashnode.com/@Hansxy)

[Jan 22, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61ec80fea12088017fbea8b3)

Hi Boris, From where comes submodels\_resamples\_kfold\_tbl in 'Time Series Forecasting Lab (Part 6) - Stacked Ensembles' ? I'm currently using time\_series\_cv(), which seems to be wrong. Could you provide the complete script in cronological order e.g. on Github? [https://github.com/guzu92/courses](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/Link)

[Boris Guarisma](https://hashnode.com/@bguarisma)

[Jan 23, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61ec80fea12088017fbea8b3#reply-61ed1daba12088017fbeb6ee)

Hi John, thank you for your message. Indeed, I forgot to explain how the resampled predictions are obtained, I have inserted a new code snippet above, see "Generate predictons for meta-learners". Use function modeltime\_fit\_resamples() which uses the k-fold resamples from vfold\_cv().

[John Rambo](https://hashnode.com/@Hansxy)

[Jan 23, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61ec80fea12088017fbea8b3#reply-61ed457d5fbc177f9f3b6ed3)

[Boris Guarisma](https://hashnode.com/@bguarisma) Hello, this is different from Matt's documentation pages. I never attended his labs and have to compare/test your code against my self-thought construction. Till now, I get different .resample\_results objects per model and therefor not all predictions for the metalearner. Thank you for your writings.

[Boris Guarisma](https://hashnode.com/@bguarisma)

[Jan 26, 2022](https://hashnode.com/posts/time-series-forecasting-lab-part-6-stacked-ensembles/61e5ecea00c806252387c7ea/comment/61ec80fea12088017fbea8b3#reply-61f10e37e247b2151e620b6c)

[John Rambo](https://hashnode.com/@Hansxy) Thanks ! FYI the article has been updated, mostly at the end (final forecast) where I've skipped an important part.
