1 #' @include ShapeForecaster.R
3 #' @title Persistence Shape Forecaster
5 #' @description Return the last centered last (similar) day curve (may be a lot of NAs,
6 #' but we cannot do better). Inherits \code{\link{ShapeForecaster}}
7 PersistenceShapeForecaster = setRefClass(
8 Class = "PersistenceShapeForecaster",
9 contains = "ShapeForecaster",
12 initialize = function(...)
16 predict = function(today, memory, horizon, ...)
18 #return centered last (similar) day curve (may be a lot of NAs, but we cannot do better)
19 last_similar_serie = data$getCenteredSerie(today-6)[1:horizon]
20 if (any(is.na(last_similar_serie))) #TODO: