X-Git-Url: https://git.auder.net/images/pieces/%22%20%20%20VariantRules.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=pkg%2FR%2FF_Zero.R;h=21e6e006749cd623dbb8f824b3235aceb7fca2f5;hb=81cb8b9e38ae82f2c108f11df56d53c9e29366ed;hp=56bb4a5d4579a845453544d3099f4b66fb68ab2e;hpb=4e821712ee4349b08a0ab3f6bcb35a00342ddef4;p=talweg.git diff --git a/pkg/R/F_Zero.R b/pkg/R/F_Zero.R index 56bb4a5..21e6e00 100644 --- a/pkg/R/F_Zero.R +++ b/pkg/R/F_Zero.R @@ -1,7 +1,6 @@ #' Zero Forecaster #' -#' Flat prediction: always forecast a serie of zeros. -#' This serie is then adjusted using the ".pjump" function (see \code{Forecaster} class). +#' Flat prediction: always forecast a serie of zeros (adjusted by 'pjump' function). #' #' @usage # ZeroForecaster$new(pjump) #' @@ -13,7 +12,7 @@ ZeroForecaster = R6::R6Class("ZeroForecaster", inherit = Forecaster, public = list( - predictShape = function(data, today, memory, horizon, ...) - rep(0, horizon) + predictShape = function(data, today, memory, predict_from, horizon, ...) + rep(0, (horizon-predict_from+1)) ) )