X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=R%2FForecast.R;fp=R%2FForecast.R;h=0000000000000000000000000000000000000000;hb=469529710f56c790ae932b45d13fed2e34bcabf2;hp=57817e7ba75fb6955cafdb6bfab3e0a33ed403e5;hpb=4c59ec9aefef8ea5464723a293b3aa39ee02dc60;p=talweg.git diff --git a/R/Forecast.R b/R/Forecast.R deleted file mode 100644 index 57817e7..0000000 --- a/R/Forecast.R +++ /dev/null @@ -1,57 +0,0 @@ -#' @title Forecast -#' -#' @description Forecast encapsulation -#' -#' @field pred List with -#' \itemize{ -#' \item serie: forecasted serie -#' \item params: corresponding list of parameters (weights, neighbors...) -#' \item index: corresponding index in data object -#' } -#' -#' @exportClass Forecast -#' @export Forecast -Forecast = setRefClass( - Class = "Forecast", - - fields = list( - pred = "list" - ), - - methods = list( - initialize = function(...) - { - "Initialize empty Forecast object" - - callSuper(...) - }, - append = function(new_serie, new_params, new_index) - { - "Obtain a new pair (serie, params)" - - pred[[length(pred)+1]] <<- list("serie"=new_serie, "params"=new_params, "index"=new_index) - }, - getSize = function() - { - length(pred) - }, - getSerie = function(index) - { - "Get serie values at specified index" - - pred[[index]]$serie - }, - getParams = function(index) - { - "Get params at specified index" - - pred[[index]]$params - }, - getIndexInData = function(index) - { - "Get (day) index in data where prediction took place" - - pred[[index]]$index - } - ) -)