X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FF_Zero.R;h=21e6e006749cd623dbb8f824b3235aceb7fca2f5;hb=4f3fdbb8e2ac4bd57a4e27539a58ef0e7ec2304c;hp=3c46f2c6959bbcced5bd8e62863242a393415d23;hpb=c4c329f65e6e842917cdfbabff36fbca6a617d02;p=talweg.git diff --git a/pkg/R/F_Zero.R b/pkg/R/F_Zero.R index 3c46f2c..21e6e00 100644 --- a/pkg/R/F_Zero.R +++ b/pkg/R/F_Zero.R @@ -1,15 +1,18 @@ #' Zero Forecaster #' -#' Flat prediction of next series of 'horizon' values. +#' Flat prediction: always forecast a serie of zeros (adjusted by 'pjump' function). #' +#' @usage # ZeroForecaster$new(pjump) +#' +#' @docType class #' @format R6 class, inherits Forecaster -#' @alias F_Zero +#' @aliases F_Zero #' 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)) ) )