#' @include ShapeForecaster.R #' #' @title Average Shape Forecaster #' #' @description Return the (pointwise) average of the all the centered day curves in the past. #' Inherits \code{\link{ShapeForecaster}} AverageShapeForecaster = setRefClass( Class = "AverageShapeForecaster", contains = "ShapeForecaster", methods = list( initialize = function(...) { callSuper(...) }, predict = function(today, memory, horizon, ...) { avg = rep(0., horizon) for (i in (today-memory):today) { if (!any(is.na(data$getSerie(i)))) avg = avg + data$getCenteredSerie(i) } avg } ) )