- f = computeFilaments(data, 143, limit=60, plot=FALSE)
- # Expected output: 23 series of type 3 (closer), then 50-3-10 series of type 2, then 143
- expect_identical(length(f$indices), as.integer(61)) #61 because result also contain today
- expect_identical(length(f$colors), as.integer(61))
- expect_true(all(I(f$indices) >= 2))
- for (i in 1:23)
+ pred = computeForecast(data, 143, "Neighbors", "Zero",
+ horizon=length(data$getSerie(1)), simtype="endo", h_window=1)
+ f = computeFilaments(data, pred, 1, limit=60, plot=FALSE)
+
+ # Expected output: 50-3-10 series of type 2, then 23 series of type 3 (closest next)
+ expect_identical(length(f$neighb_indices), as.integer(60))
+ expect_identical(length(f$colors), as.integer(60))
+ expect_equal(f$index, 143)
+ expect_true(all(I(f$neighb_indices) >= 2))
+ for (i in 1:37)