+ pred00_z = getForecast(data00, indices, "Average", "Zero", Inf, 24)
+ pred00_p = getForecast(data00, indices, "Average", "Persistence", Inf, 24)
+ for (i in seq_along(indices))
+ {
+ #zero jump: should predict true values minus 1
+ expect_identical(pred00_z$getSerie(i), rep(i,24))
+ #persistence jump == 1: should predict true values
+ expect_identical(pred00_p$getSerie(i), rep(i%%7+1,24))
+ }
+
+ #NOTE: days become
+ #1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 (14h-->0h then 1h-->13h)
+ #No jump between days, thus zero and persistence are equivalent (and wrong)
+ pred13_z = getForecast(data13, indices, "Average", "Zero", Inf, 24)
+ pred13_p = getForecast(data13, indices, "Average", "Persistence", Inf, 24)
+ prediction = c(rep(-13/24,11),rep(11/24,13))
+ for (i in seq_along(indices))
+ {
+ expect_equal(pred13_z$getSerie(i), prediction )
+ expect_equal(pred13_p$getSerie(i), prediction )
+ }