X-Git-Url: https://git.auder.net/js/rpsls.js?a=blobdiff_plain;f=pkg%2FR%2FF_Average.R;h=c28125ef0a8d6d9c64d42037bde6bc9737bf6f3b;hb=ea5c7e56ca05a51ce4f0535ffa08cda4c14bff4a;hp=abc88be0db29e610e420e7e3a8d0b3a2751e728c;hpb=25b75559e2d9bf84e2de35b851d93fefdae36e17;p=talweg.git diff --git a/pkg/R/F_Average.R b/pkg/R/F_Average.R index abc88be..c28125e 100644 --- a/pkg/R/F_Average.R +++ b/pkg/R/F_Average.R @@ -4,11 +4,12 @@ #' #' Return the (pointwise) average of the all the (similar) centered day curves #' in the past. Inherits \code{\link{Forecaster}} +#' AverageForecaster = R6::R6Class("AverageForecaster", - inherit = "Forecaster", + inherit = Forecaster, public = list( - predictShape = function(today, memory, horizon, ...) + predictShape = function(data, today, memory, horizon, ...) { avg = rep(0., horizon) first_day = max(1, today-memory)