X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2FcomputeForecast.R;fp=pkg%2FR%2FcomputeForecast.R;h=e50e63dc950ef13679bd8e8ed4962b008bd5663a;hp=082ba80d7887ea81914f47eadcf68a45e7c9c8e7;hb=81cb8b9e38ae82f2c108f11df56d53c9e29366ed;hpb=a3344f7591f6f4b3d337a69e4a568e9b16e33415 diff --git a/pkg/R/computeForecast.R b/pkg/R/computeForecast.R index 082ba80..e50e63d 100644 --- a/pkg/R/computeForecast.R +++ b/pkg/R/computeForecast.R @@ -3,6 +3,8 @@ #' Predict time-series curves ("today" from predict_from to horizon) at the selected days #' indices ("today" from 1am to predict_from-1). This function just runs a loop over all #' requested indices, and stores the individual forecasts into a Forecast object. +#' Note: in training stage ts_hat(day+1) = f(ts(day), exo(day+1)), +#' and in production ts_hat(day+1) = f(ts(day), exo_hat(day+1)) #' #' @param data Object of class Data, output of \code{getData()}. #' @param indices Indices where to forecast (the day after); integers relative to the @@ -32,9 +34,9 @@ #' @return An object of class Forecast #' #' @examples -#' ts_data <- system.file("extdata","pm10_mesures_H_loc.csv",package="talweg") -#' exo_data <- system.file("extdata","meteo_extra_noNAs.csv",package="talweg") -#' data <- getData(ts_data, exo_data, limit=200) +#' ts_data <- system.file("extdata","intraday_measures.csv",package="talweg") +#' exo_data <- system.file("extdata","daily_exogenous.csv",package="talweg") +#' data <- getData(ts_data, exo_data, date_format="%Y-%m-%d %H:%M:%S", limit=200) #' pred <- computeForecast(data, 100:130, "Persistence", "LastValue", #' predict_from=8, memory=50, horizon=12, ncores=1) #' \dontrun{