Leverage StatsForecast models to create features
MSTL
model, which decomposes the series into trend and seasonal components.
This guide shows you how to use the
mstl_decomposition
function to extract those features for training and then use their
future values for inference.
unique_id | ds | y | |
---|---|---|---|
0 | H1 | 1 | 605.0 |
1 | H1 | 2 | 586.0 |
2 | H1 | 3 | 586.0 |
3 | H1 | 4 | 559.0 |
4 | H1 | 5 | 511.0 |
unique_id | ds | y | trend | seasonal | |
---|---|---|---|---|---|
0 | H1 | 1 | 605.0 | 502.872910 | 131.419934 |
1 | H1 | 2 | 586.0 | 507.873456 | 93.100015 |
2 | H1 | 3 | 586.0 | 512.822533 | 82.155386 |
3 | H1 | 4 | 559.0 | 517.717481 | 42.412749 |
4 | H1 | 5 | 511.0 | 522.555849 | -11.401890 |
unique_id | ds | trend | seasonal | |
---|---|---|---|---|
0 | H1 | 701 | 643.801348 | -29.189627 |
1 | H1 | 702 | 644.328207 | -99.680432 |
2 | H1 | 703 | 644.749693 | -141.169014 |
3 | H1 | 704 | 645.086883 | -173.325625 |
4 | H1 | 705 | 645.356634 | -195.862530 |
unique_id | ds | ARIMA | |
---|---|---|---|
0 | H1 | 701 | 612.737668 |
1 | H1 | 702 | 542.851796 |
2 | H1 | 703 | 501.931839 |
3 | H1 | 704 | 470.248289 |
4 | H1 | 705 | 448.115839 |