tests/testthat/test_initCrit.R

test_that("infill crit initialization", {

  fn = makeSphereFunction(2) # 2d continous space

  expect_equal(setValue(crit.cb1, "opt.direction", "minimize"), initCrit(crit.cb, fn))
  expect_equal(crit.ei, initCrit(crit.ei, fn))

  crit.cb3 = makeMBOInfillCritCB(3)

  expect_equal(setValue(crit.cb3, "opt.direction", "minimize"), initCrit(crit.cb3, fn))

  fn = makeSwiler2014Function() # 2d continous space + 1 factor variable

  expect_equal(setValue(crit.cb2, "opt.direction", "minimize"), initCrit(crit.cb, fn))
  expect_equal(setValue(crit.cb3, "opt.direction", "minimize"), initCrit(crit.cb3, fn))


})

Try the mlrMBO package in your browser

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

mlrMBO documentation built on June 25, 2018, 9:04 a.m.