View source: R/ts_deterministic.R
| ts_periodic | R Documentation |
Forecast a univariate series by repeating a learned periodic cycle.
ts_periodic(period, context_size = NULL)
period |
Integer. Cycle length to repeat. |
context_size |
Optional integer. Most recent values used to identify the next state within the cycle. When omitted, the smallest non-ambiguous value is inferred automatically. |
A ts_periodic object, inheriting from ts_deterministic.
series <- c(4, 5, 6, 7, 1, 2, 3)
model <- ts_periodic(7)
model <- daltoolbox::fit(model, x = series)
predict(model, steps_ahead = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.