'update'
[talweg.git] / reports / year2015.gj
... / ...
CommitLineData
1-----r
2library(talweg)
3
4P = ${P} #première heure de prévision
5H = ${H} #dernière heure de prévision
6
7ts_data = read.csv(system.file("extdata","pm10_mesures_H_loc.csv",
8 package="talweg"))
9exo_data = read.csv(system.file("extdata","meteo_extra_noNAs.csv",
10 package="talweg"))
11data = getData(ts_data, exo_data)
12
13indices = seq(as.Date("2015-01-01"),as.Date("2015-12-31"),"days")
14-----r
15p1 = computeForecast(data, indices, "Neighbors", "Neighbors",
16 predict_from=P, horizon=H, simtype="mix", local=FALSE)
17p2 = computeForecast(data, indices, "Neighbors", "Zero",
18 predict_from=P, horizon=H, simtype="none", local=TRUE)
19p3 = computeForecast(data, indices, "Average", "LastValue",
20 predict_from=P, horizon=H)
21p4 = computeForecast(data, indices, "Persistence", "LastValue",
22 predict_from=P, horizon=H, same_day=TRUE)
23-----r
24e1 = computeError(data, p1, P, H)
25e2 = computeError(data, p2, P, H)
26e3 = computeError(data, p3, P, H)
27e4 = computeError(data, p4, P, H)
28options(repr.plot.width=9, repr.plot.height=7)
29plotError(list(e1, e4, e3, e2), cols=c(1,2,colors()[258],4), agg="month")
30
31# noir: Neighbors non-local (p1), bleu: Neighbors local (p2),
32# vert: moyenne (p3), rouge: persistence (p4)