I have a timeseries of a value with a fairly high frequency (15 minutes). The timeseries has no missing values and shows some daily and weekly periodic components.
I'm trying to model it using fable
in R, but I can't seem to find any decent result, and I wonder if I`m doing something wrong.
Here`s my code, using an example dataset that can be downloaded:
library(tsibble)
library(fable)
library(dplyr)
library(lubridate)
download.file("https://srv-file7.gofile.io/download/9yo0cg/so_data.csv", destfile = "so_data.csv", method = "wget")
csv = read.csv("so_data.csv") %>%
mutate(time = ymd_hms(time)) %>%
as_tsibble(index = time)
# Take a look
csv %>% summary
csv %>% autoplot
This is the timeseries:
As you can see it is pretty regular, with good daily periodicity. Let's try to model it using the default settings for a few models:
csv %>%
model(
ets = ETS(value),
arima = ARIMA(value),
snaive = SNAIVE(value)
) %>%
forecast(h = "1 week") %>%
autoplot(csv)
All of them fail spectacularly:
My limited understanding of this process is clearly at fault here, and default values are not useful in this situation. However I tried tuning them, unfortunately, I was unable to capture anything better. Anyway, as I am a noob in the field I do not understand if this is due to:
- me not setting proper default parameters (I should dive much deeper into
fable
's reference book) - the limited data I have available (short time series, only a few months)
- approach not suitable to fast-varying data (daily and weekly recurring patterns)
- issues in my code