Hi everyone, in section 7.4 of FPP3 while comparing the performance of Fourier series in Time series data following code was shown in the video:-
fit_aus_cafe <- aus_cafe %>%
model(
K1 = TSLM(log(Turnover) ~ trend() + fourier(K = 1)),
K2 = TSLM(log(Turnover) ~ trend() + fourier(K = 2)),
K3 = TSLM(log(Turnover) ~ trend() + fourier(K = 3)),
K4 = TSLM(log(Turnover) ~ trend() + fourier(K = 4)),
K5 = TSLM(log(Turnover) ~ trend() + fourier(K = 5)),
K6 = TSLM(log(Turnover) ~ trend() + fourier(K = 6))
)
report(fit_aus_cafe)
Thereafter the plots were shown for different values of K. Can anyone help me with the code for those individual plots. I am able to get a combined plot for all K values.
Thanks
I think we need to see your code and some sample data.
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
It might a/lso help if we knew what *section 7.4 of FPP3 * refers to.
Are you sure that was the right section? fit_beer
using the aus_production
dataset is used in the videos:
7.4 Some useful predictors | Forecasting: Principles and Practice (3rd ed) (otexts.com)
Thats important tips you have provided for posting question on this forum. I ll keep them in mind next time onwards. VMT.
Thank You Sir. Your book has been a very important source for learning about time series forecasting and it has helped immensely in my line of work. Initially I was not very comfortable with time series forecasting but after reading the book I feel pretty confident now.
system
Closed
July 26, 2023, 3:55am
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.