This is my first time posting here , I am doing an energy consumption forecast , my data contains the energy every hours I have two seasonality ,every 24 hours and every 7 days (daily and weekly). I have found a good article here https://petolau.github.io/Analyzing-double-seasonal-time-series-with-GAM-in-R/ , talking about almost the same thing. in my case , the dataset isn't that good , it is over a year and has a lot of gaps in it , for example between 12 Jan and 16 Jan I don't have values so and in some cases the missing values can exceed 8 months on a row.my objective is to create an algorithm that is capable of predicting the missing values for any data set with a specific format , in my case I have 4 variables , daily , weekly , Load and date. here comes my problem ,when I am testing different methods , those with two seasonality are capable of predicting only one week ahead , in other words when I applied gamm model like this :

gam_m <- gam(Load ~ t2(Daily, Weekly,
                       k = c(24, 7),
                       bs = c("cr", "ps"),
                       full = TRUE),
             data = matrix_train,
             family = gaussian)

First problem : fitted values equals predictions , for hour number two in third day of the week we will have the same load in predictions as well as in fitted, can you help me please to make the model goes beyond a week of forecast or should I use something else. here is a plot of fitted values over 18 days , every rectangle represents a week and the values are the same in all weeks enter image description here

  • $\begingroup$ I don't know the model you are using at all. You might consider using multiple imputations to fit missing values. I have never seen it addressed in the context of time series data however. $\endgroup$ – user54285 Mar 16 at 22:19
  • $\begingroup$ thank you very much for the suggestion , i will try doing that and tell you what i got. $\endgroup$ – zemni houssem Mar 19 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.