tests/testthat/select_obs.R

context("Check select_neighbours() function")

test_that("Output rf",{
  library("DALEX")
  new_apartment <- apartments[1, 2:6]
  small_apartments <- select_neighbours(apartments_test, new_apartment, n = 10)

  expect_true(nrow(small_apartments) == 10)

  small_apartments <- select_sample(apartments_test, n = 10)

  expect_true(nrow(small_apartments) == 10)
})

Try the ingredients package in your browser

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

ingredients documentation built on April 10, 2021, 5:06 p.m.