0986a3dfc9faa4f1703728a2c1c4c3bdb0c93ba2
[talweg.git] / pkg / tests / testthat / test.Forecaster.R
1 context("Check that forecasters behave as expected")
2
3 test_that("Average+Zero method behave as expected",
4 {
5 ts_data = system.file("testdata","ts",package="talweg")
6 exo_data = system.file("testdata","exo",package="talweg")
7
8 data0 = getData(ts_data, exo_data, input_tz="GMT", date_format="%Y-%m-%d %H:%M",
9 working_tz="GMT", predict_at=0, limit=Inf)
10 #TODO: with and without shift at origin (so series values at least forst ones are required)
11
12 indices = ...
13 pred0 = getForecast(.......)
14
15 for (i in seq_along(indices))
16 {
17 expect_identical(....)
18 }
19
20 data13 = getData(ts_data, exo_data, input_tz="GMT", date_format="%Y-%m-%d %H:%M",
21 working_tz="GMT", predict_at=13, limit=Inf)
22 #Attention: jours deviennent 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 (14h-->0h puis 1h-->13h)
23 }
24
25 test_that("Persistence+Zero method behave as expected",
26 {
27 }
28
29 test_that("Neighbors+Zero method behave as expected",
30 {
31 }
32
33 test_that("Neighbors+Neighbors method behave as expected",
34 {
35 }