X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FF_Average.R;h=5058825c7d9fa7916f1aa4ead566f0b5c5a06e2e;hb=af3b84f4cacade7d83221ca0249b546c50ddf340;hp=abc88be0db29e610e420e7e3a8d0b3a2751e728c;hpb=25b75559e2d9bf84e2de35b851d93fefdae36e17;p=talweg.git diff --git a/pkg/R/F_Average.R b/pkg/R/F_Average.R index abc88be..5058825 100644 --- a/pkg/R/F_Average.R +++ b/pkg/R/F_Average.R @@ -5,7 +5,7 @@ #' 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, ...) @@ -17,7 +17,7 @@ AverageForecaster = R6::R6Class("AverageForecaster", repeat { { - serie_on_horizon = data$getCenteredSerie(index)[1:horizon] + serie_on_horizon = private$.data$getCenteredSerie(index)[1:horizon] index = index - 7 }; if (!any(is.na(serie_on_horizon)))