e9a2c93902eb428291331cbe7c4d509921438d34
[talweg.git] / pkg / man / getForecast.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/getForecast.R
3 \name{getForecast}
4 \alias{getForecast}
5 \title{get Forecast}
6 \usage{
7 getForecast(data, indices, forecaster, pjump, memory = Inf,
8 horizon = data$getStdHorizon(), ...)
9 }
10 \arguments{
11 \item{data}{Dataset, object of type \code{Data} output of \code{getData}}
12
13 \item{indices}{Days indices where to forecast (the day after)}
14
15 \item{forecaster}{Name of the main forcaster
16 \itemize{
17 \item Persistence : use values of last (similar, next) day
18 \item Neighbors : use values from the k closest neighbors' tomorrows
19 \item Average : global average of all the (similar) "tomorrow of past"
20 \item Zero : just output 0 (benchmarking purpose)
21 \item Level : output a flat serie repeating the last observed level
22 }}
23
24 \item{pjump}{How to predict the jump at the interface between two days ?
25 \itemize{
26 \item Persistence : use last (similar) day values
27 \item Neighbors: re-use the weights optimized in corresponding forecaster
28 \item Zero: just output 0 (no adjustment)
29 }}
30
31 \item{memory}{Data depth (in days) to be used for prediction}
32
33 \item{horizon}{Number of time steps to predict}
34
35 \item{...}{Additional parameters for the forecasting models}
36 }
37 \value{
38 An object of class Forecast
39 }
40 \description{
41 Predict time-series curves for the selected days indices (lines in data).
42 }
43 \examples{
44 data = getData(ts_data="data/pm10_mesures_H_loc.csv", exo_data="data/meteo_extra_noNAs.csv",
45 input_tz = "Europe/Paris", working_tz="Europe/Paris", predict_at=7)
46 pred = getForecast(data, 2200:2230, "Persistence", "Persistence", 500, 12)
47 \dontrun{#Sketch for real-time mode:
48 data = new("Data", ...)
49 forecaster = new(..., data=data)
50 repeat {
51 data$append(some_new_data)
52 pred = forecaster$predict(data$getSize(), ...)
53 #do_something_with_pred
54 }}
55 }
56