% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getForecast.R \name{getForecast} \alias{getForecast} \title{get Forecast} \usage{ getForecast(data, indices, forecaster, pjump, memory = Inf, horizon = data$getStdHorizon(), ...) } \arguments{ \item{data}{Dataset, object of type \code{Data} output of \code{getData}} \item{indices}{Days indices where to forecast (the day after)} \item{forecaster}{Name of the main forcaster \itemize{ \item Persistence : use values of last (similar, next) day \item Neighbors : use values from the k closest neighbors' tomorrows \item Average : global average of all the (similar) "tomorrow of past" \item Zero : just output 0 (benchmarking purpose) \item Level : output a flat serie repeating the last observed level }} \item{pjump}{How to predict the jump at the interface between two days ? \itemize{ \item Persistence : use last (similar) day values \item Neighbors: re-use the weights optimized in corresponding forecaster \item Zero: just output 0 (no adjustment) }} \item{memory}{Data depth (in days) to be used for prediction} \item{horizon}{Number of time steps to predict} \item{...}{Additional parameters for the forecasting models} } \value{ An object of class Forecast } \description{ Predict time-series curves for the selected days indices (lines in data). } \examples{ data = getData(ts_data="data/pm10_mesures_H_loc.csv", exo_data="data/meteo_extra_noNAs.csv", input_tz = "Europe/Paris", working_tz="Europe/Paris", predict_at=7) pred = getForecast(data, 2200:2230, "Persistence", "Persistence", 500, 12) \dontrun{#Sketch for real-time mode: data = new("Data", ...) forecaster = new(..., data=data) repeat { data$append(some_new_data) pred = forecaster$predict(data$getSize(), ...) #do_something_with_pred }} }