X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FForecast.R;h=bb665bdf8bfda8f205aab91a71ac60e94fcc2baf;hb=689aa1d3c58e8b1e9fdfa9b895ca38c7228f56cc;hp=a0ddcda8070e647047802985bd5b2792a3b6814f;hpb=72b9c50162bcdcf6c99fbb8b2ec6ea9ba98379cb;p=talweg.git diff --git a/pkg/R/Forecast.R b/pkg/R/Forecast.R index a0ddcda..bb665bd 100644 --- a/pkg/R/Forecast.R +++ b/pkg/R/Forecast.R @@ -1,15 +1,23 @@ #' Forecast #' -#' Forecast encapsulation +#' Forecast encapsulation as a list (days where prediction occur) of lists (components). #' -#' @docType class -#' @importFrom R6 R6Class +#' The private field .pred is a list where each cell contains the predicted variables for +#' a period of time of H<=24 hours, from hour P+1 until P+H, where P+1 is taken right +#' after the end of the period designated by \code{getIndexInData()}. In other terms, +#' \code{forecast$getForecast(i)} return forecasts for \code{data$getSerie(i+1)}. +#' Each cell .pred[[i]] is itself a list containing three slots, as described in the +#' 'field' section. +#' +#' @usage f <- Forecast$new(dates) #' -#' @field .pred List with \itemize{ -#' \item serie: forecasted serie +#' @field .pred List with +#' \itemize{ +#' \item serie: the forecasted serie #' \item params: corresponding list of parameters (weights, neighbors...) -#' \item index_in_data: corresponding index in data object} -#' @field .dates vector of day indices where forcast occurs +#' \item index_in_data: corresponding index in data object +#' } +#' @field .dates vector of (integer) day indices where forecast occurs #' #' @section Methods: #' \describe{ @@ -30,6 +38,9 @@ #' Get index in data which corresponds to current forecast.} #' } #' +#' @docType class +#' @format R6 class +#' Forecast = R6::R6Class("Forecast", private = list( .pred = list(),