tests/testthat/test-smotenc_impl.R

test_that("bad args", {
  expect_snapshot(
    error = TRUE,
    smotenc(matrix())
  )
  expect_snapshot(
    error = TRUE,
    smotenc(circle_example, var = "class", k = 0)
  )
  expect_snapshot(
    error = TRUE,
    smotenc(circle_example, var = "class", k = 5.5)
  )
  expect_snapshot(
    error = TRUE,
    smotenc(circle_example, var = "class", over_ratio = TRUE)
  )
})

Try the themis package in your browser

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

themis documentation built on April 4, 2025, 2:32 a.m.