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"
28 append = function(new_serie, new_params, new_index)
30 "Obtain a new pair (serie, params)"
32 pred[[length(pred)+1]] <<- list("serie"=new_serie, "params"=new_params, "index"=new_index)
38 getSerie = function(index)
40 "Get serie values at specified index"
44 getParams = function(index)
46 "Get params at specified index"
50 getIndexInData = function(index)
52 "Get (day) index in data where prediction took place"