3 #' @description Forecast encapsulation
5 #' @field pred List with
7 #' \item serie: forecasted serie
8 #' \item params: corresponding list of parameters (weights, neighbors...)
9 #' \item index: corresponding index in data object
12 #' @exportClass Forecast
14 Forecast = setRefClass(
22 initialize = function(...)
24 "Initialize empty Forecast object"
30 "Number of individual forecasts"
34 append = function(new_serie, new_params, new_index)
36 "Obtain a new pair (serie, params)"
38 pred[[length(pred)+1]] <<- list("serie"=new_serie, "params"=new_params, "index"=new_index)
40 getSerie = function(index)
42 "Serie values at specified index"
46 getParams = function(index)
48 "Params at specified index"
52 getIndexInData = function(index)
54 "(day) Index in data where prediction took place"