tests/testthat/test_n_training_examples.R

context("n_training_examples function")

test_that("number of examples with MIMO strategy", {
  expect_equal(n_training_examples(ts(1:10), h = 2, lags = 1:3, msas = "MIMO"),
               6)
})

test_that("number of examples with recursive strategy", {
  expect_equal(
    n_training_examples(ts(1:10), h = 2, lags = 1:3, msas = "recursive"),
    7
  )
})

Try the tsfknn package in your browser

Any scripts or data that you put into this service are public.

tsfknn documentation built on Sept. 4, 2023, 9:06 a.m.