Revision 272ac623c984dbf5defce76b6495c05accafe79f authored by Patrick Schratz on 17 December 2019, 04:08:28 UTC, committed by Patrick Schratz on 17 December 2019, 04:08:28 UTC
Build URL: https://circleci.com/gh/mlr-org/mlr/1264
Commit:
1 parent 9de9c6e
Raw File
test_tuneMIES.R
context("tuneMIES")

test_that("tuneMIES", {
  res = makeResampleDesc("Holdout")
  ps1 = makeParamSet(
    makeNumericVectorParam("cutoff", length=2, lower=0.001, upper=1, trafo=function(x) as.numeric(x / sum(x))), 
    makeIntegerParam("ntree", lower=10, upper=1000), 
    makeLogicalParam("replace")
  )
  
  ctrl = makeTuneControlMies(budget=20, lambda=5)
  lrn = makeLearner("classif.randomForest")
  tr1 = tune(lrn, binaryclass.task, res, par.set=ps1, control=ctrl)
  expect_equal(getOptPathLength(tr1@opt.path), 10)
  expect_equal(dim(as.data.frame(tr1@opt.path)), c(10, 3+1+2))
})
  
back to top