Running ‘run-base.R’ [502s/469s]
Running the tests in ‘tests/run-base.R’ failed.
Complete output:
  > library(testthat)
  > test_check("mlr", filter = "base_")
  Loading required package: mlr
  Loading required package: ParamHelpers
  
  Attaching package: 'rex'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  
  Attaching package: 'BBmisc'
  
  The following object is masked from 'package:base':
  
      isFALSE
  
  ── 1. Error: basic PreprocWrapperCaret works (@test_base_PreprocWrapperCaret.R#6
  there is no package called 'caret'
  1: train(lrn2, multiclass.task, subset = multiclass.train.inds) at testthat/test_base_PreprocWrapperCaret.R:6
  2: measureTime(fun1({
         learner.model = fun2(fun3(do.call(trainLearner, pars)))
     }))
  3: force(expr)
  4: fun1({
         learner.model = fun2(fun3(do.call(trainLearner, pars)))
     })
  5: evalVis(expr)
  6: withVisible(eval(expr, pf))
  7: eval(expr, pf)
  8: eval(expr, pf)
  9: fun2(fun3(do.call(trainLearner, pars)))
  10: fun3(do.call(trainLearner, pars))
  ...
  14: .learner$train(data = getTaskData(.task, .subset, functionals.as = "matrix"), target = getTaskTargetNames(.task), 
         args = pvs)
  15: do.call(caret::preProcess, c(list(x = x), cargs))
  16: caret::preProcess
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  ── 2. Error: PreprocessWrapperCaret supports nzv,zv and corr method with differe
  there is no package called 'caret'
  1: caret::preProcess at testthat/test_base_PreprocWrapperCaret.R:36
  2: getExportedValue(pkg, name)
  3: asNamespace(ns)
  4: getNamespace(ns)
  5: tryCatch(loadNamespace(name), error = function(e) stop(e))
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 3. Error: PreprocessWrapperCaret creates the same output as preProcess for me
  there is no package called 'caret'
  1: caret::preProcess at testthat/test_base_PreprocWrapperCaret.R:55
  2: getExportedValue(pkg, name)
  3: asNamespace(ns)
  4: getNamespace(ns)
  5: tryCatch(loadNamespace(name), error = function(e) stop(e))
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 4. Error: clustering performance (@test_base_clustering.R#19)  ──────────────
  Please install the following packages: clusterSim
  1: expect_true(is.numeric(performance(pred, task = noclass.task, measures = db))) at testthat/test_base_clustering.R:19
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: performance(pred, task = noclass.task, measures = db)
  5: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  6: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  7: FUN(X[[i]], ...)
  8: measure$fun(task, model, pred, feats, m$extra.args)
  9: requirePackages("clusterSim", default.method = "load")
  10: stopf("Please install the following packages: %s", ps)
  
  ── 5. Error: clustering performance with missing clusters (@test_base_clustering
  Please install the following packages: clusterSim
  1: expect_warning(performance(pred, task = noclass.task, measures = db), NA) at testthat/test_base_clustering.R:32
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: performance(pred, task = noclass.task, measures = db)
  7: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  8: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  9: FUN(X[[i]], ...)
  10: measure$fun(task, model, pred, feats, m$extra.args)
  11: requirePackages("clusterSim", default.method = "load")
  12: stopf("Please install the following packages: %s", ps)
  
  ── 6. Error: clustering resample (@test_base_clustering.R#42)  ─────────────────
  Please install the following packages: clusterSim
  1: resample(lrn, noclass.task, rdesc) at testthat/test_base_clustering.R:42
  2: parallelMap(doResampleIteration, seq_len(rin$desc$iters), level = "mlr.resample", 
         more.args = more.args)
  3: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  4: (function (learner, task, rin, i, measures, weights, model, extract, show.info) 
     {
         setSlaveOptions()
         train.i = rin$train.inds[[i]]
         test.i = rin$test.inds[[i]]
         calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
             test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, 
             model = model, extract = extract, show.info = show.info)
     })(dots[[1L]][[1L]], learner = structure(list(id = "cluster.SimpleKMeans", type = "cluster", 
         package = "RWeka", properties = "numerics", par.set = structure(list(pars = list(
             A = structure(list(id = "A", type = "untyped", len = 1L, lower = NULL, upper = NULL, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = "weka.core.EuclideanDistance", trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), C = structure(list(id = "C", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), fast = structure(list(id = "fast", type = "logical", len = 1L, 
                 lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), I = structure(list(
                 id = "I", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 100L, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), init = structure(list(
                 id = "init", type = "integer", len = 1L, lower = 0L, upper = 3L, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0L, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), M = structure(list(id = "M", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), `max-candidates` = structure(list(id = "max-candidates", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `min-density` = structure(list(id = "min-density", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), N = structure(list(id = "N", type = "integer", len = 1L, lower = 1L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), `num-slots` = structure(list(
                 id = "num-slots", type = "integer", len = 1L, lower = 1L, upper = Inf, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), O = structure(list(
                 id = "O", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `periodic-pruning` = structure(list(id = "periodic-pruning", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 10000L, trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), S = structure(list(id = "S", type = "integer", len = 1L, lower = 0L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 10L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), t2 = structure(list(
                 id = "t2", type = "numeric", len = 1L, lower = -Inf, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = -1, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), t1 = structure(list(id = "t1", type = "numeric", len = 1L, lower = -Inf, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = -1.5, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), V = structure(list(
                 id = "V", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = FALSE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `output-debug-info` = structure(list(id = "output-debug-info", type = "logical", 
                 len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = FALSE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(), predict.type = "response", name = "K-Means Clustering", 
         short.name = "simplekmeans", note = "", callees = c("SimpleKMeans", "Weka_control"
         ), help.list = list(), config = list(), fix.factors.prediction = FALSE), class = c("cluster.SimpleKMeans", 
     "RLearnerCluster", "RLearner", "Learner")), task = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "noclass", type = "cluster", target = character(0), size = 150L, n.feat = c(numerics = 4L, 
             factors = 0L, ordered = 0L, functionals = 0L), has.missings = FALSE, has.weights = FALSE, 
             has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task")), rin = structure(list(desc = structure(list(split = 0.3, id = "subsampling", 
         iters = 2L, predict = "test", stratify = FALSE), class = c("SubsampleDesc", "ResampleDesc"
     )), size = 150L, train.inds = list(c(128L, 75L, 58L, 37L, 17L, 57L, 83L, 32L, 64L, 
     31L, 71L, 50L, 90L, 52L, 49L, 73L, 100L, 30L, 55L, 35L, 82L, 24L, 111L, 95L, 85L, 
     78L, 47L, 66L, 107L, 140L, 101L, 38L, 84L, 143L, 69L, 56L, 141L, 142L, 103L, 120L, 
     114L, 36L, 122L, 67L, 134L), c(70L, 61L, 98L, 23L, 84L, 35L, 139L, 86L, 74L, 57L, 
     124L, 51L, 40L, 24L, 137L, 66L, 34L, 29L, 90L, 7L, 92L, 46L, 53L, 105L, 116L, 36L, 
     120L, 132L, 146L, 131L, 48L, 141L, 67L, 82L, 107L, 72L, 49L, 62L, 121L, 133L, 44L, 
     22L, 123L, 17L, 143L)), test.inds = list(c(99L, 26L, 94L, 46L, 106L, 139L, 138L, 
     23L, 54L, 63L, 121L, 131L, 87L, 130L, 136L, 42L, 43L, 3L, 61L, 105L, 1L, 9L, 20L, 
     53L, 118L, 125L, 15L, 123L, 25L, 7L, 124L, 145L, 6L, 68L, 10L, 8L, 86L, 129L, 93L, 
     149L, 147L, 96L, 119L, 41L, 14L, 89L, 40L, 137L, 5L, 27L, 127L, 62L, 18L, 148L, 60L, 
     21L, 92L, 48L, 104L, 65L, 88L, 108L, 91L, 28L, 70L, 34L, 113L, 74L, 102L, 72L, 11L, 
     59L, 44L, 45L, 133L, 117L, 126L, 146L, 110L, 115L, 77L, 81L, 112L, 39L, 150L, 76L, 
     80L, 22L, 79L, 16L, 98L, 135L, 109L, 51L, 132L, 4L, 33L, 29L, 19L, 13L, 97L, 12L, 
     116L, 144L, 2L), c(83L, 99L, 26L, 94L, 106L, 58L, 138L, 103L, 37L, 31L, 140L, 73L, 
     54L, 63L, 114L, 87L, 130L, 136L, 42L, 43L, 3L, 1L, 9L, 20L, 85L, 111L, 118L, 125L, 
     15L, 25L, 145L, 6L, 68L, 30L, 10L, 8L, 129L, 78L, 93L, 149L, 147L, 96L, 71L, 119L, 
     69L, 64L, 55L, 41L, 14L, 89L, 38L, 32L, 56L, 5L, 27L, 127L, 18L, 148L, 75L, 60L, 
     21L, 104L, 122L, 128L, 65L, 88L, 95L, 142L, 108L, 91L, 28L, 113L, 50L, 102L, 11L, 
     134L, 59L, 45L, 101L, 117L, 126L, 110L, 47L, 115L, 77L, 81L, 112L, 39L, 100L, 150L, 
     76L, 80L, 79L, 16L, 135L, 109L, 4L, 33L, 19L, 13L, 97L, 12L, 52L, 144L, 2L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         weights = NULL, measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         model = FALSE, extract = function (model) 
         {
         }, show.info = FALSE)
  5: calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
         test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, model = model, 
         extract = extract, show.info = show.info)
  6: performance(task = task, model = m, pred = pred.test, measures = measures)
  7: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  8: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  9: FUN(X[[i]], ...)
  10: measure$fun(task, model, pred, feats, m$extra.args)
  11: requirePackages("clusterSim", default.method = "load")
  12: stopf("Please install the following packages: %s", ps)
  
  ── 7. Error: clustering benchmark (@test_base_clustering.R#55)  ────────────────
  Please install the following packages: clusterSim
  1: benchmark(learners = learners, task = tasks, resamplings = makeResampleDesc("CV", 
         iters = 2L)) at testthat/test_base_clustering.R:55
  2: parallelMap(benchmarkParallel, task = grid$task, learner = grid$learner, more.args = list(learners = learners, 
         tasks = tasks, resamplings = resamplings, measures = measures, keep.pred = keep.pred, 
         models = models, show.info = show.info), level = plevel)
  3: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  4: (function (task, learner, learners, tasks, resamplings, measures, keep.pred = TRUE, 
         models = TRUE, show.info) 
     {
         setSlaveOptions()
         if (show.info) 
             messagef("Task: %s, Learner: %s", task, learner)
         lrn = learners[[learner]]
         extract.this = getExtractor(lrn)
         r = resample(lrn, tasks[[task]], resamplings[[task]], measures = measures, models = models, 
             extract = extract.this, keep.pred = keep.pred, show.info = show.info)
         r$learner = lrn
         return(r)
     })(task = dots[[1L]][[1L]], learner = dots[[2L]][[1L]], learners = list(cluster.SimpleKMeans = structure(list(
         id = "cluster.SimpleKMeans", type = "cluster", package = "RWeka", properties = "numerics", 
         par.set = structure(list(pars = list(A = structure(list(id = "A", type = "untyped", 
             len = 1L, lower = NULL, upper = NULL, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = "weka.core.EuclideanDistance", trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), C = structure(list(id = "C", type = "logical", len = 1L, lower = NULL, 
             upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), fast = structure(list(id = "fast", type = "logical", len = 1L, lower = NULL, 
             upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), I = structure(list(id = "I", type = "integer", len = 1L, lower = 1L, 
             upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
             default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), init = structure(list(
             id = "init", type = "integer", len = 1L, lower = 0L, upper = 3L, values = NULL, 
             cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0L, trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), M = structure(list(id = "M", type = "logical", len = 1L, lower = NULL, 
             upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), `max-candidates` = structure(list(id = "max-candidates", type = "integer", 
             len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), `min-density` = structure(list(id = "min-density", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), N = structure(list(id = "N", type = "integer", len = 1L, lower = 1L, upper = Inf, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 2L, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), `num-slots` = structure(list(id = "num-slots", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), O = structure(list(id = "O", type = "logical", len = 1L, lower = NULL, upper = NULL, 
             values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), `periodic-pruning` = structure(list(id = "periodic-pruning", type = "integer", 
             len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 10000L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), S = structure(list(id = "S", type = "integer", len = 1L, lower = 0L, upper = Inf, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 10L, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), t2 = structure(list(id = "t2", type = "numeric", len = 1L, lower = -Inf, 
             upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
             default = -1, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), t1 = structure(list(
             id = "t1", type = "numeric", len = 1L, lower = -Inf, upper = Inf, values = NULL, 
             cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = -1.5, trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), V = structure(list(id = "V", type = "logical", len = 1L, lower = NULL, 
             upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, 
             tunable = FALSE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), `output-debug-info` = structure(list(id = "output-debug-info", type = "logical", 
             len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
             cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
             requires = NULL, tunable = FALSE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), par.vals = list(), 
         predict.type = "response", name = "K-Means Clustering", short.name = "simplekmeans", 
         note = "", callees = c("SimpleKMeans", "Weka_control"), help.list = list(), config = list(), 
         fix.factors.prediction = FALSE), class = c("cluster.SimpleKMeans", "RLearnerCluster", 
     "RLearner", "Learner"))), tasks = list(noclass = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "noclass", type = "cluster", target = character(0), size = 150L, n.feat = c(numerics = 4L, 
             factors = 0L, ordered = 0L, functionals = 0L), has.missings = FALSE, has.weights = FALSE, 
             has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task"))), resamplings = list(noclass = structure(list(desc = structure(list(id = "cross-validation", 
         iters = 2L, predict = "test", stratify = FALSE), class = c("CVDesc", "ResampleDesc"
     )), size = 150L, train.inds = list(c(32L, 64L, 71L, 50L, 52L, 49L, 73L, 30L, 55L, 
     95L, 107L, 101L, 143L, 69L, 56L, 141L, 122L, 134L, 136L, 68L, 16L, 148L, 96L, 139L, 
     118L, 27L, 44L, 23L, 20L, 98L, 5L, 133L, 34L, 76L, 145L, 86L, 127L, 109L, 41L, 138L, 
     4L, 18L, 13L, 40L, 121L, 22L, 72L, 119L, 113L, 11L, 29L, 61L, 8L, 115L, 63L, 94L, 
     135L, 19L, 21L, 12L, 144L, 1L, 91L, 99L, 2L, 14L, 28L, 70L, 48L, 42L, 126L, 15L, 
     80L, 150L, 54L), c(128L, 75L, 58L, 37L, 17L, 57L, 83L, 31L, 90L, 100L, 35L, 82L, 
     24L, 111L, 85L, 78L, 47L, 66L, 140L, 38L, 84L, 142L, 103L, 120L, 114L, 36L, 67L, 
     43L, 129L, 59L, 39L, 131L, 102L, 92L, 60L, 112L, 149L, 89L, 53L, 51L, 123L, 81L, 
     147L, 26L, 77L, 10L, 97L, 33L, 62L, 130L, 87L, 137L, 25L, 74L, 88L, 45L, 65L, 93L, 
     117L, 3L, 79L, 125L, 106L, 105L, 110L, 108L, 6L, 46L, 132L, 104L, 124L, 9L, 7L, 116L, 
     146L)), test.inds = list(c(3L, 6L, 7L, 9L, 10L, 17L, 24L, 25L, 26L, 31L, 33L, 35L, 
     36L, 37L, 38L, 39L, 43L, 45L, 46L, 47L, 51L, 53L, 57L, 58L, 59L, 60L, 62L, 65L, 66L, 
     67L, 74L, 75L, 77L, 78L, 79L, 81L, 82L, 83L, 84L, 85L, 87L, 88L, 89L, 90L, 92L, 93L, 
     97L, 100L, 102L, 103L, 104L, 105L, 106L, 108L, 110L, 111L, 112L, 114L, 116L, 117L, 
     120L, 123L, 124L, 125L, 128L, 129L, 130L, 131L, 132L, 137L, 140L, 142L, 146L, 147L, 
     149L), c(1L, 2L, 4L, 5L, 8L, 11L, 12L, 13L, 14L, 15L, 16L, 18L, 19L, 20L, 21L, 22L, 
     23L, 27L, 28L, 29L, 30L, 32L, 34L, 40L, 41L, 42L, 44L, 48L, 49L, 50L, 52L, 54L, 55L, 
     56L, 61L, 63L, 64L, 68L, 69L, 70L, 71L, 72L, 73L, 76L, 80L, 86L, 91L, 94L, 95L, 96L, 
     98L, 99L, 101L, 107L, 109L, 113L, 115L, 118L, 119L, 121L, 122L, 126L, 127L, 133L, 
     134L, 135L, 136L, 138L, 139L, 141L, 143L, 144L, 145L, 148L, 150L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance")), 
         measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         keep.pred = TRUE, models = TRUE, show.info = FALSE)
  5: resample(lrn, tasks[[task]], resamplings[[task]], measures = measures, models = models, 
         extract = extract.this, keep.pred = keep.pred, show.info = show.info)
  6: parallelMap(doResampleIteration, seq_len(rin$desc$iters), level = "mlr.resample", 
         more.args = more.args)
  7: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  8: (function (learner, task, rin, i, measures, weights, model, extract, show.info) 
     {
         setSlaveOptions()
         train.i = rin$train.inds[[i]]
         test.i = rin$test.inds[[i]]
         calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
             test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, 
             model = model, extract = extract, show.info = show.info)
     })(dots[[1L]][[1L]], learner = structure(list(id = "cluster.SimpleKMeans", type = "cluster", 
         package = "RWeka", properties = "numerics", par.set = structure(list(pars = list(
             A = structure(list(id = "A", type = "untyped", len = 1L, lower = NULL, upper = NULL, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = "weka.core.EuclideanDistance", trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), C = structure(list(id = "C", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), fast = structure(list(id = "fast", type = "logical", len = 1L, 
                 lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), I = structure(list(
                 id = "I", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 100L, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), init = structure(list(
                 id = "init", type = "integer", len = 1L, lower = 0L, upper = 3L, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0L, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), M = structure(list(id = "M", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), `max-candidates` = structure(list(id = "max-candidates", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `min-density` = structure(list(id = "min-density", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), N = structure(list(id = "N", type = "integer", len = 1L, lower = 1L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), `num-slots` = structure(list(
                 id = "num-slots", type = "integer", len = 1L, lower = 1L, upper = Inf, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), O = structure(list(
                 id = "O", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `periodic-pruning` = structure(list(id = "periodic-pruning", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 10000L, trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), S = structure(list(id = "S", type = "integer", len = 1L, lower = 0L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 10L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), t2 = structure(list(
                 id = "t2", type = "numeric", len = 1L, lower = -Inf, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = -1, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), t1 = structure(list(id = "t1", type = "numeric", len = 1L, lower = -Inf, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = -1.5, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), V = structure(list(
                 id = "V", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = FALSE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `output-debug-info` = structure(list(id = "output-debug-info", type = "logical", 
                 len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = FALSE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(), predict.type = "response", name = "K-Means Clustering", 
         short.name = "simplekmeans", note = "", callees = c("SimpleKMeans", "Weka_control"
         ), help.list = list(), config = list(), fix.factors.prediction = FALSE), class = c("cluster.SimpleKMeans", 
     "RLearnerCluster", "RLearner", "Learner")), task = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "noclass", type = "cluster", target = character(0), size = 150L, n.feat = c(numerics = 4L, 
             factors = 0L, ordered = 0L, functionals = 0L), has.missings = FALSE, has.weights = FALSE, 
             has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task")), rin = structure(list(desc = structure(list(id = "cross-validation", iters = 2L, 
         predict = "test", stratify = FALSE), class = c("CVDesc", "ResampleDesc")), size = 150L, 
         train.inds = list(c(32L, 64L, 71L, 50L, 52L, 49L, 73L, 30L, 55L, 95L, 107L, 101L, 
         143L, 69L, 56L, 141L, 122L, 134L, 136L, 68L, 16L, 148L, 96L, 139L, 118L, 27L, 
         44L, 23L, 20L, 98L, 5L, 133L, 34L, 76L, 145L, 86L, 127L, 109L, 41L, 138L, 4L, 
         18L, 13L, 40L, 121L, 22L, 72L, 119L, 113L, 11L, 29L, 61L, 8L, 115L, 63L, 94L, 
         135L, 19L, 21L, 12L, 144L, 1L, 91L, 99L, 2L, 14L, 28L, 70L, 48L, 42L, 126L, 15L, 
         80L, 150L, 54L), c(128L, 75L, 58L, 37L, 17L, 57L, 83L, 31L, 90L, 100L, 35L, 82L, 
         24L, 111L, 85L, 78L, 47L, 66L, 140L, 38L, 84L, 142L, 103L, 120L, 114L, 36L, 67L, 
         43L, 129L, 59L, 39L, 131L, 102L, 92L, 60L, 112L, 149L, 89L, 53L, 51L, 123L, 81L, 
         147L, 26L, 77L, 10L, 97L, 33L, 62L, 130L, 87L, 137L, 25L, 74L, 88L, 45L, 65L, 
         93L, 117L, 3L, 79L, 125L, 106L, 105L, 110L, 108L, 6L, 46L, 132L, 104L, 124L, 
         9L, 7L, 116L, 146L)), test.inds = list(c(3L, 6L, 7L, 9L, 10L, 17L, 24L, 25L, 
         26L, 31L, 33L, 35L, 36L, 37L, 38L, 39L, 43L, 45L, 46L, 47L, 51L, 53L, 57L, 58L, 
         59L, 60L, 62L, 65L, 66L, 67L, 74L, 75L, 77L, 78L, 79L, 81L, 82L, 83L, 84L, 85L, 
         87L, 88L, 89L, 90L, 92L, 93L, 97L, 100L, 102L, 103L, 104L, 105L, 106L, 108L, 
         110L, 111L, 112L, 114L, 116L, 117L, 120L, 123L, 124L, 125L, 128L, 129L, 130L, 
         131L, 132L, 137L, 140L, 142L, 146L, 147L, 149L), c(1L, 2L, 4L, 5L, 8L, 11L, 12L, 
         13L, 14L, 15L, 16L, 18L, 19L, 20L, 21L, 22L, 23L, 27L, 28L, 29L, 30L, 32L, 34L, 
         40L, 41L, 42L, 44L, 48L, 49L, 50L, 52L, 54L, 55L, 56L, 61L, 63L, 64L, 68L, 69L, 
         70L, 71L, 72L, 73L, 76L, 80L, 86L, 91L, 94L, 95L, 96L, 98L, 99L, 101L, 107L, 
         109L, 113L, 115L, 118L, 119L, 121L, 122L, 126L, 127L, 133L, 134L, 135L, 136L, 
         138L, 139L, 141L, 143L, 144L, 145L, 148L, 150L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         weights = NULL, measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         model = TRUE, extract = function (model) 
         {
             NULL
         }, show.info = FALSE)
  9: calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
         test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, model = model, 
         extract = extract, show.info = show.info)
  10: performance(task = task, model = m, pred = pred.test, measures = measures)
  11: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  12: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  13: FUN(X[[i]], ...)
  14: measure$fun(task, model, pred, feats, m$extra.args)
  15: requirePackages("clusterSim", default.method = "load")
  16: stopf("Please install the following packages: %s", ps)
  
  ── 8. Error: clustering tune (@test_base_clustering.R#72)  ─────────────────────
  Please install the following packages: clusterSim
  1: tuneParams(lrn, noclass.task, rdesc, par.set = ps, control = ctrl) at testthat/test_base_clustering.R:72
  2: sel.func(learner, task, resampling, measures, par.set, control, opt.path, show.info, 
         resample.fun)
  3: evalOptimizationStatesTune(learner, task, resampling, measures, par.set, control, 
         opt.path, show.info, vals, dobs = seq_along(vals), eols = NA_integer_, remove.nas = TRUE, 
         resample.fun)
  4: evalOptimizationStates(learner, task, resampling, measures, par.set, NULL, control, 
         opt.path, show.info, states, dobs, eols, remove.nas, resample.fun, "mlr.tuneParams")
  5: parallelMap(evalOptimizationState, dobs, states, level = level, more.args = list(learner = learner, 
         task = task, resampling = resampling, measures = measures, par.set = par.set, 
         bits.to.features = bits.to.features, control = control, opt.path = opt.path, 
         show.info = show.info, remove.nas = remove.nas, resample.fun = resample.fun))
  6: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  7: (function (learner, task, resampling, measures, par.set, bits.to.features, control, 
         opt.path, show.info, dob, state, remove.nas, resample.fun) 
     {
         setSlaveOptions()
         y = setNames(rep(NA_real_, length(measures)), vcapply(measures, measureAggrName))
         errmsg = NA_character_
         exec.time = NA_real_
         set.pars.ok = TRUE
         learner2 = learner
         threshold = NULL
         log.fun = control$log.fun
         err.dumps = list()
         if (inherits(control, "TuneControl") || inherits(control, "TuneMultiCritControl")) {
             state = setValueCNames(par.set, state)
             state = trafoValue(par.set, state)
             state2 = if (remove.nas) 
                 removeMissingValues(state)
             else state
             learner2 = try(setHyperPars(learner, par.vals = state2), silent = TRUE)
             if (is.error(learner2)) {
                 set.pars.ok = FALSE
                 errmsg = as.character(learner2)
                 if (show.info) 
                     messagef("[Tune-x] Setting hyperpars failed: %s", errmsg)
             }
         }
         else if (inherits(control, "FeatSelControl")) {
             task = subsetTask(task, features = bits.to.features(state, task))
         }
         if (show.info) 
             prev.stage = log.fun(learner, task, resampling, measures, par.set, control, 
                 opt.path, dob, state, NA_real_, remove.nas, stage = 1L)
         if (set.pars.ok) {
             exec.time = measureTime({
                 r = resample.fun(learner2, task, resampling, measures = measures, show.info = FALSE)
             })
             if (control$tune.threshold) {
                 th.args = control$tune.threshold.args
                 th.args$pred = r$pred
                 th.args$measure = measures[[1L]]
                 tune.th.res = do.call(tuneThreshold, th.args)
                 threshold = tune.th.res$th
                 y = performance(setThreshold(r$pred, threshold = threshold), measures = measures)
                 names(y) = names(r$aggr)
             }
             else {
                 y = r$aggr
             }
             errmsgs = as.character(t(r$err.msgs[, -1L]))
             notna = !is.na(errmsgs)
             if (any(notna)) 
                 errmsg = errmsgs[notna][1L]
             err.dumps = r$err.dumps
         }
         else {
             if (control$tune.threshold) 
                 threshold = NA_real_
         }
         if (show.info) 
             log.fun(learner, task, resampling, measures, par.set, control, opt.path, 
                 dob, state, y, remove.nas, stage = 2L, prev.stage = prev.stage)
         list(y = y, exec.time = exec.time, errmsg = errmsg, threshold = threshold, err.dumps = err.dumps)
     })(dots[[1L]][[1L]], dots[[2L]][[1L]], learner = structure(list(id = "cluster.SimpleKMeans", 
         type = "cluster", package = "RWeka", properties = "numerics", par.set = structure(list(
             pars = list(A = structure(list(id = "A", type = "untyped", len = 1L, lower = NULL, 
                 upper = NULL, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = "weka.core.EuclideanDistance", trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), C = structure(list(id = "C", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), fast = structure(list(id = "fast", type = "logical", len = 1L, 
                 lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), I = structure(list(
                 id = "I", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 100L, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), init = structure(list(
                 id = "init", type = "integer", len = 1L, lower = 0L, upper = 3L, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0L, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), M = structure(list(id = "M", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), `max-candidates` = structure(list(id = "max-candidates", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `min-density` = structure(list(id = "min-density", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), N = structure(list(id = "N", type = "integer", len = 1L, lower = 1L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), `num-slots` = structure(list(
                 id = "num-slots", type = "integer", len = 1L, lower = 1L, upper = Inf, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), O = structure(list(
                 id = "O", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `periodic-pruning` = structure(list(id = "periodic-pruning", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 10000L, trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), S = structure(list(id = "S", type = "integer", len = 1L, lower = 0L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 10L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), t2 = structure(list(
                 id = "t2", type = "numeric", len = 1L, lower = -Inf, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = -1, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), t1 = structure(list(id = "t1", type = "numeric", len = 1L, lower = -Inf, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = -1.5, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), V = structure(list(
                 id = "V", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = FALSE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `output-debug-info` = structure(list(id = "output-debug-info", type = "logical", 
                 len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = FALSE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(), predict.type = "response", name = "K-Means Clustering", 
         short.name = "simplekmeans", note = "", callees = c("SimpleKMeans", "Weka_control"
         ), help.list = list(), config = list(), fix.factors.prediction = FALSE), class = c("cluster.SimpleKMeans", 
     "RLearnerCluster", "RLearner", "Learner")), task = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "noclass", type = "cluster", target = character(0), size = 150L, n.feat = c(numerics = 4L, 
             factors = 0L, ordered = 0L, functionals = 0L), has.missings = FALSE, has.weights = FALSE, 
             has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task")), resampling = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 150L, train.inds = list(c(36L, 144L, 90L, 76L, 59L, 128L, 
     53L, 42L, 25L, 142L, 68L, 150L, 30L, 93L, 7L, 95L, 48L, 55L, 109L, 121L, 37L, 124L, 
     94L, 88L, 136L, 50L, 60L, 69L, 86L, 111L, 75L, 51L, 64L, 126L, 31L, 46L, 23L, 135L, 
     18L, 148L, 61L, 73L, 19L, 140L, 34L, 77L, 143L, 100L, 99L, 74L, 26L, 22L, 146L, 103L, 
     119L, 120L, 16L, 38L, 44L, 79L, 84L, 91L, 129L, 83L, 45L, 125L, 29L, 131L, 2L, 41L, 
     70L, 1L, 6L, 13L, 98L, 56L, 72L, 35L, 78L, 47L, 54L, 10L, 27L, 145L, 4L, 97L, 5L, 
     15L, 66L, 81L, 112L, 101L, 118L, 96L, 43L, 122L, 80L, 147L, 149L, 110L)), test.inds = list(
         c(116L, 108L, 92L, 65L, 8L, 49L, 32L, 113L, 39L, 14L, 130L, 57L, 115L, 52L, 40L, 
         24L, 63L, 105L, 133L, 67L, 17L, 104L, 82L, 28L, 134L, 58L, 106L, 138L, 12L, 89L, 
         127L, 62L, 117L, 85L, 21L, 132L, 33L, 9L, 11L, 102L, 137L, 87L, 20L, 114L, 71L, 
         141L, 3L, 139L, 107L, 123L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         par.set = structure(list(pars = list(N = structure(list(id = "N", type = "integer", 
             len = 1L, lower = 2, upper = 10, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = FALSE, default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list()), class = "Param")), forbidden = NULL), class = "ParamSet"), 
         bits.to.features = NULL, control = structure(list(same.resampling.instance = TRUE, 
             impute.val = Inf, tune.threshold = FALSE, tune.threshold.args = list(), log.fun = function (learner, 
                 task, resampling, measures, par.set, control, opt.path, dob, x, y, remove.nas, 
                 stage, prev.stage) 
             {
                 x.string = paramValueToString(par.set, x, show.missing.values = !remove.nas)
                 if (inherits(learner, "ModelMultiplexer")) 
                     x.string = stri_replace_all(x.string, "", regex = stri_paste(x$selected.learner, 
                       "\\."))
                 logFunDefault(learner, task, resampling, measures, par.set, control, 
                     opt.path, dob, x.string, y, remove.nas, stage, prev.stage, prefixes = c("Tune-x", 
                       "Tune-y"))
             }, final.dw.perc = NULL, extra.args = list(maxit = 2L), budget = 2L), class = c("TuneControlRandom", 
         "TuneControl", "OptControl")), opt.path = structure(list(par.set = structure(list(
             pars = list(N = structure(list(id = "N", type = "integer", len = 1L, lower = 2, 
                 upper = 10, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                 default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param")), 
             forbidden = NULL), class = "ParamSet"), y.names = "db.test.mean", minimize = c(db.test.mean = TRUE), 
             add.transformed.x = FALSE, env = <environment>), class = c("OptPathDF", "OptPath"
         )), show.info = FALSE, remove.nas = TRUE, resample.fun = function (learner, task, 
             resampling, measures, weights = NULL, models = FALSE, extract, keep.pred = TRUE, 
             ..., show.info = getMlrOption("show.info")) 
         {
             learner = checkLearner(learner)
             learner = setHyperPars(learner, ...)
             assertClass(task, classes = "Task")
             n = getTaskSize(task)
             if (inherits(resampling, "ResampleDesc")) 
                 resampling = makeResampleInstance(resampling, task = task)
             assertClass(resampling, classes = "ResampleInstance")
             measures = checkMeasures(measures, task)
             if (!is.null(weights)) {
                 assertNumeric(weights, len = n, any.missing = FALSE, lower = 0)
             }
             assertFlag(models)
             if (missing(extract)) 
                 extract = function(model) {
                 }
             else assertFunction(extract)
             assertFlag(show.info)
             r = resampling$size
             if (n != r) 
                 stop(stri_paste("Size of data set:", n, "and resampling instance:", r, 
                     "differ!", sep = " "))
             checkLearnerBeforeTrain(task, learner, weights)
             checkAggrsBeforeResample(measures, resampling$desc)
             rin = resampling
             more.args = list(learner = learner, task = task, rin = rin, weights = NULL, 
                 measures = measures, model = models, extract = extract, show.info = show.info)
             if (!is.null(weights)) {
                 more.args$weights = weights
             }
             else if (!is.null(getTaskWeights(task))) {
                 more.args$weights = getTaskWeights(task)
             }
             parallelLibrary("mlr", master = FALSE, level = "mlr.resample", show.info = FALSE)
             exportMlrOptions(level = "mlr.resample")
             if (show.info) {
                 messagef("Resampling: %s", rin$desc$id)
                 measure.lognames = extractSubList(measures, "id")
                 if (rin$desc$predict == "both") {
                     id.train = which(vlapply(measures, function(x) "req.train" %in% x$aggr$properties))
                     id.test = which(vlapply(measures, function(x) "req.test" %in% x$aggr$properties))
                     measure.lognames = c(stri_paste(measure.lognames[id.train], "train", 
                       sep = "."), stri_paste(measure.lognames[id.test], "test", sep = "."))
                 }
                 printResampleFormatLine("Measures:", measure.lognames)
             }
             time1 = Sys.time()
             iter.results = parallelMap(doResampleIteration, seq_len(rin$desc$iters), 
                 level = "mlr.resample", more.args = more.args)
             time2 = Sys.time()
             runtime = as.numeric(difftime(time2, time1, units = "secs"))
             addClasses(mergeResampleResult(learner$id, task, iter.results, measures, 
                 rin, models, extract, keep.pred, show.info, runtime), "ResampleResult")
         })
  8: measureTime({
         r = resample.fun(learner2, task, resampling, measures = measures, show.info = FALSE)
     })
  9: force(expr)
  10: resample.fun(learner2, task, resampling, measures = measures, show.info = FALSE)
  11: parallelMap(doResampleIteration, seq_len(rin$desc$iters), level = "mlr.resample", 
         more.args = more.args)
  12: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  13: (function (learner, task, rin, i, measures, weights, model, extract, show.info) 
     {
         setSlaveOptions()
         train.i = rin$train.inds[[i]]
         test.i = rin$test.inds[[i]]
         calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
             test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, 
             model = model, extract = extract, show.info = show.info)
     })(dots[[1L]][[1L]], learner = structure(list(id = "cluster.SimpleKMeans", type = "cluster", 
         package = "RWeka", properties = "numerics", par.set = structure(list(pars = list(
             A = structure(list(id = "A", type = "untyped", len = 1L, lower = NULL, upper = NULL, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = "weka.core.EuclideanDistance", trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), C = structure(list(id = "C", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), fast = structure(list(id = "fast", type = "logical", len = 1L, 
                 lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), I = structure(list(
                 id = "I", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 100L, 
                 trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), init = structure(list(
                 id = "init", type = "integer", len = 1L, lower = 0L, upper = 3L, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0L, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), M = structure(list(id = "M", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = TRUE, default = FALSE, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), `max-candidates` = structure(list(id = "max-candidates", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 100L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `min-density` = structure(list(id = "min-density", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), N = structure(list(id = "N", type = "integer", len = 1L, lower = 1L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 2L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), `num-slots` = structure(list(
                 id = "num-slots", type = "integer", len = 1L, lower = 1L, upper = Inf, 
                 values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), O = structure(list(
                 id = "O", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `periodic-pruning` = structure(list(id = "periodic-pruning", type = "integer", 
                 len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 10000L, trafo = NULL, requires = NULL, 
                 tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), S = structure(list(id = "S", type = "integer", len = 1L, lower = 0L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 10L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), t2 = structure(list(
                 id = "t2", type = "numeric", len = 1L, lower = -Inf, upper = Inf, values = NULL, 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = -1, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param")), t1 = structure(list(id = "t1", type = "numeric", len = 1L, lower = -Inf, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = -1.5, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), V = structure(list(
                 id = "V", type = "logical", len = 1L, lower = NULL, upper = NULL, values = list(
                     `TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = FALSE, trafo = NULL, requires = NULL, tunable = FALSE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), `output-debug-info` = structure(list(id = "output-debug-info", type = "logical", 
                 len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                 cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = FALSE, 
                 trafo = NULL, requires = NULL, tunable = FALSE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(N = 6L), predict.type = "response", name = "K-Means Clustering", 
         short.name = "simplekmeans", note = "", callees = c("SimpleKMeans", "Weka_control"
         ), help.list = list(), config = list(), fix.factors.prediction = FALSE), class = c("cluster.SimpleKMeans", 
     "RLearnerCluster", "RLearner", "Learner")), task = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "noclass", type = "cluster", target = character(0), size = 150L, n.feat = c(numerics = 4L, 
             factors = 0L, ordered = 0L, functionals = 0L), has.missings = FALSE, has.weights = FALSE, 
             has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task")), rin = structure(list(desc = structure(list(split = 0.666666666666667, id = "holdout", 
         iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", "ResampleDesc"
     )), size = 150L, train.inds = list(c(36L, 144L, 90L, 76L, 59L, 128L, 53L, 42L, 25L, 
     142L, 68L, 150L, 30L, 93L, 7L, 95L, 48L, 55L, 109L, 121L, 37L, 124L, 94L, 88L, 136L, 
     50L, 60L, 69L, 86L, 111L, 75L, 51L, 64L, 126L, 31L, 46L, 23L, 135L, 18L, 148L, 61L, 
     73L, 19L, 140L, 34L, 77L, 143L, 100L, 99L, 74L, 26L, 22L, 146L, 103L, 119L, 120L, 
     16L, 38L, 44L, 79L, 84L, 91L, 129L, 83L, 45L, 125L, 29L, 131L, 2L, 41L, 70L, 1L, 
     6L, 13L, 98L, 56L, 72L, 35L, 78L, 47L, 54L, 10L, 27L, 145L, 4L, 97L, 5L, 15L, 66L, 
     81L, 112L, 101L, 118L, 96L, 43L, 122L, 80L, 147L, 149L, 110L)), test.inds = list(
         c(116L, 108L, 92L, 65L, 8L, 49L, 32L, 113L, 39L, 14L, 130L, 57L, 115L, 52L, 40L, 
         24L, 63L, 105L, 133L, 67L, 17L, 104L, 82L, 28L, 134L, 58L, 106L, 138L, 12L, 89L, 
         127L, 62L, 117L, 85L, 21L, 132L, 33L, 9L, 11L, 102L, 137L, 87L, 20L, 114L, 71L, 
         141L, 3L, 139L, 107L, 123L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         weights = NULL, measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         model = FALSE, extract = function (model) 
         {
         }, show.info = FALSE)
  14: calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
         test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, model = model, 
         extract = extract, show.info = show.info)
  15: performance(task = task, model = m, pred = pred.test, measures = measures)
  16: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  17: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  18: FUN(X[[i]], ...)
  19: measure$fun(task, model, pred, feats, m$extra.args)
  20: requirePackages("clusterSim", default.method = "load")
  21: stopf("Please install the following packages: %s", ps)
  
  ── 9. Error: plotFilterValues (@test_base_generateFilterValuesData.R#68)  ──────
  For learner classif.ranger please install the following packages: ranger
  1: generateFilterValuesData(binaryclass.task, method = filter.classif) at testthat/test_base_generateFilterValuesData.R:68
  2: lapply(filter, function(x) {
         x = do.call(x$fun, c(list(task = task, nselect = nselect), more.args[[x$name]]))
         missing.score = setdiff(fn, names(x))
         x[missing.score] = NA_real_
         x[match(fn, names(x))]
     })
  3: FUN(X[[i]], ...)
  4: do.call(x$fun, c(list(task = task, nselect = nselect), more.args[[x$name]]))
  5: (function (task, nselect, ...) 
     {
         lrn.type = paste0(getTaskType(task), ".ranger")
         lrn = makeLearner(lrn.type, importance = "impurity", ...)
         mod = train(lrn, task)
         ranger::importance(mod$learner.model)
     })(task = structure(list(type = "classif", env = <environment>, weights = NULL, blocking = NULL, 
         coordinates = NULL, task.desc = structure(list(id = "binary", type = "classif", 
             target = "Class", size = 208L, n.feat = c(numerics = 60L, factors = 0L, ordered = 0L, 
             functionals = 0L), has.missings = FALSE, has.weights = FALSE, has.blocking = FALSE, 
             has.coordinates = FALSE, class.levels = c("M", "R"), positive = "M", negative = "R", 
             class.distribution = structure(c(M = 111L, R = 97L), .Dim = 2L, .Dimnames = list(
                 c("M", "R")), class = "table")), class = c("ClassifTaskDesc", "SupervisedTaskDesc", 
         "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", "Task")), nselect = 60L)
  6: makeLearner(lrn.type, importance = "impurity", ...)
  7: do.call(constructor, list())
  8: (function () 
     {
         makeRLearnerClassif(cl = "classif.ranger", package = "ranger", par.set = makeParamSet(makeIntegerLearnerParam(id = "num.trees", 
             lower = 1L, default = 500L), makeIntegerLearnerParam(id = "mtry", lower = 1L), 
             makeNumericLearnerParam(id = "mtry.perc", lower = 0, upper = 1), makeIntegerLearnerParam(id = "min.node.size", 
                 lower = 1L), makeLogicalLearnerParam(id = "replace", default = TRUE), 
             makeNumericLearnerParam(id = "sample.fraction", lower = 0L, upper = 1L), 
             makeNumericVectorLearnerParam(id = "split.select.weights", lower = 0, upper = 1), 
             makeUntypedLearnerParam(id = "always.split.variables"), makeDiscreteLearnerParam("respect.unordered.factors", 
                 values = c("ignore", "order", "partition"), default = "ignore"), makeDiscreteLearnerParam(id = "importance", 
                 values = c("none", "impurity", "permutation"), default = "none", tunable = FALSE), 
             makeLogicalLearnerParam(id = "write.forest", default = TRUE, tunable = FALSE), 
             makeLogicalLearnerParam(id = "scale.permutation.importance", default = FALSE, 
                 requires = quote(importance == "permutation"), tunable = FALSE), makeIntegerLearnerParam(id = "num.threads", 
                 lower = 1L, when = "both", tunable = FALSE), makeLogicalLearnerParam(id = "save.memory", 
                 default = FALSE, tunable = FALSE), makeLogicalLearnerParam(id = "verbose", 
                 default = TRUE, when = "both", tunable = FALSE), makeIntegerLearnerParam(id = "seed", 
                 when = "both", tunable = FALSE), makeDiscreteLearnerParam(id = "splitrule", 
                 values = c("gini", "extratrees"), default = "gini"), makeIntegerLearnerParam(id = "num.random.splits", 
                 lower = 1L, default = 1L, requires = quote(splitrule == "extratrees")), 
             makeLogicalLearnerParam(id = "keep.inbag", default = FALSE, tunable = FALSE)), 
             par.vals = list(num.threads = 1L, verbose = FALSE, respect.unordered.factors = "order"), 
             properties = c("twoclass", "multiclass", "prob", "numerics", "factors", "ordered", 
                 "featimp", "weights", "oobpreds"), name = "Random Forests", short.name = "ranger", 
             note = "By default, internal parallelization is switched off (`num.threads = 1`), `verbose` output is disabled, `respect.unordered.factors` is set to `order` for all splitrules. All settings are changeable. `mtry.perc` sets `mtry` to `mtry.perc*getTaskNFeats(.task)`. Default for `mtry` is the floor of square root of number of features in task. Default for `min.node.size` is 1 for classification and 10 for probability estimation.", 
             callees = "ranger")
     })()
  9: makeRLearnerClassif(cl = "classif.ranger", package = "ranger", par.set = makeParamSet(makeIntegerLearnerParam(id = "num.trees", 
         lower = 1L, default = 500L), makeIntegerLearnerParam(id = "mtry", lower = 1L), 
         makeNumericLearnerParam(id = "mtry.perc", lower = 0, upper = 1), makeIntegerLearnerParam(id = "min.node.size", 
             lower = 1L), makeLogicalLearnerParam(id = "replace", default = TRUE), makeNumericLearnerParam(id = "sample.fraction", 
             lower = 0L, upper = 1L), makeNumericVectorLearnerParam(id = "split.select.weights", 
             lower = 0, upper = 1), makeUntypedLearnerParam(id = "always.split.variables"), 
         makeDiscreteLearnerParam("respect.unordered.factors", values = c("ignore", "order", 
             "partition"), default = "ignore"), makeDiscreteLearnerParam(id = "importance", 
             values = c("none", "impurity", "permutation"), default = "none", tunable = FALSE), 
         makeLogicalLearnerParam(id = "write.forest", default = TRUE, tunable = FALSE), 
         makeLogicalLearnerParam(id = "scale.permutation.importance", default = FALSE, 
             requires = quote(importance == "permutation"), tunable = FALSE), makeIntegerLearnerParam(id = "num.threads", 
             lower = 1L, when = "both", tunable = FALSE), makeLogicalLearnerParam(id = "save.memory", 
             default = FALSE, tunable = FALSE), makeLogicalLearnerParam(id = "verbose", 
             default = TRUE, when = "both", tunable = FALSE), makeIntegerLearnerParam(id = "seed", 
             when = "both", tunable = FALSE), makeDiscreteLearnerParam(id = "splitrule", 
             values = c("gini", "extratrees"), default = "gini"), makeIntegerLearnerParam(id = "num.random.splits", 
             lower = 1L, default = 1L, requires = quote(splitrule == "extratrees")), makeLogicalLearnerParam(id = "keep.inbag", 
             default = FALSE, tunable = FALSE)), par.vals = list(num.threads = 1L, verbose = FALSE, 
         respect.unordered.factors = "order"), properties = c("twoclass", "multiclass", 
         "prob", "numerics", "factors", "ordered", "featimp", "weights", "oobpreds"), 
         name = "Random Forests", short.name = "ranger", note = "By default, internal parallelization is switched off (`num.threads = 1`), `verbose` output is disabled, `respect.unordered.factors` is set to `order` for all splitrules. All settings are changeable. `mtry.perc` sets `mtry` to `mtry.perc*getTaskNFeats(.task)`. Default for `mtry` is the floor of square root of number of features in task. Default for `min.node.size` is 1 for classification and 10 for probability estimation.", 
         callees = "ranger")
  10: addClasses(makeRLearnerInternal(cl, "classif", package, par.set, par.vals, properties, 
         name, short.name, note, callees), c(cl, "RLearnerClassif"))
  11: makeRLearnerInternal(cl, "classif", package, par.set, par.vals, properties, name, 
         short.name, note, callees)
  12: requirePackages(package, why = stri_paste("learner", id, sep = " "), default.method = "load")
  13: stopf("For %s please install the following packages: %s", why, ps)
  
  ── 10. Error: getHyperPars (@test_base_getHyperPars.R#26)  ─────────────────────
  For learner classif.xgboost please install the following packages: xgboost
  1: makeLearner("classif.xgboost", missing = NA) at testthat/test_base_getHyperPars.R:26
  2: do.call(constructor, list())
  3: (function () 
     {
         makeRLearnerClassif(cl = "classif.xgboost", package = "xgboost", par.set = makeParamSet(makeDiscreteLearnerParam(id = "booster", 
             default = "gbtree", values = c("gbtree", "gblinear", "dart")), makeUntypedLearnerParam(id = "watchlist", 
             default = NULL, tunable = FALSE), makeNumericLearnerParam(id = "eta", default = 0.3, 
             lower = 0, upper = 1), makeNumericLearnerParam(id = "gamma", default = 0, 
             lower = 0), makeIntegerLearnerParam(id = "max_depth", default = 6L, lower = 1L), 
             makeNumericLearnerParam(id = "min_child_weight", default = 1, lower = 0), 
             makeNumericLearnerParam(id = "subsample", default = 1, lower = 0, upper = 1), 
             makeNumericLearnerParam(id = "colsample_bytree", default = 1, lower = 0, 
                 upper = 1), makeNumericLearnerParam(id = "colsample_bylevel", default = 1, 
                 lower = 0, upper = 1), makeIntegerLearnerParam(id = "num_parallel_tree", 
                 default = 1L, lower = 1L), makeNumericLearnerParam(id = "lambda", default = 1, 
                 lower = 0), makeNumericLearnerParam(id = "lambda_bias", default = 0, 
                 lower = 0), makeNumericLearnerParam(id = "alpha", default = 0, lower = 0), 
             makeUntypedLearnerParam(id = "objective", default = "binary:logistic", tunable = FALSE), 
             makeUntypedLearnerParam(id = "eval_metric", default = "error", tunable = FALSE), 
             makeNumericLearnerParam(id = "base_score", default = 0.5, tunable = FALSE), 
             makeNumericLearnerParam(id = "max_delta_step", lower = 0, default = 0), makeNumericLearnerParam(id = "missing", 
                 default = NULL, tunable = FALSE, when = "both", special.vals = list(NA, 
                     NA_real_, NULL)), makeIntegerVectorLearnerParam(id = "monotone_constraints", 
                 default = 0, lower = -1, upper = 1), makeNumericLearnerParam(id = "tweedie_variance_power", 
                 lower = 1, upper = 2, default = 1.5, requires = quote(objective == "reg:tweedie")), 
             makeIntegerLearnerParam(id = "nthread", lower = 1L, tunable = FALSE), makeIntegerLearnerParam(id = "nrounds", 
                 default = 1L, lower = 1L), makeUntypedLearnerParam(id = "feval", default = NULL, 
                 tunable = FALSE), makeIntegerLearnerParam(id = "verbose", default = 1L, 
                 lower = 0L, upper = 2L, tunable = FALSE), makeIntegerLearnerParam(id = "print_every_n", 
                 default = 1L, lower = 1L, tunable = FALSE, requires = quote(verbose == 
                     1L)), makeIntegerLearnerParam(id = "early_stopping_rounds", default = NULL, 
                 lower = 1L, special.vals = list(NULL), tunable = FALSE), makeLogicalLearnerParam(id = "maximize", 
                 default = NULL, special.vals = list(NULL), tunable = FALSE), makeDiscreteLearnerParam(id = "sample_type", 
                 default = "uniform", values = c("uniform", "weighted"), requires = quote(booster == 
                     "dart")), makeDiscreteLearnerParam(id = "normalize_type", default = "tree", 
                 values = c("tree", "forest"), requires = quote(booster == "dart")), makeNumericLearnerParam(id = "rate_drop", 
                 default = 0, lower = 0, upper = 1, requires = quote(booster == "dart")), 
             makeNumericLearnerParam(id = "skip_drop", default = 0, lower = 0, upper = 1, 
                 requires = quote(booster == "dart")), makeUntypedLearnerParam(id = "callbacks", 
                 default = list(), tunable = FALSE)), par.vals = list(nrounds = 1L, verbose = 0L), 
             properties = c("twoclass", "multiclass", "numerics", "prob", "weights", "missings", 
                 "featimp"), name = "eXtreme Gradient Boosting", short.name = "xgboost", 
             note = "All settings are passed directly, rather than through `xgboost`'s `params` argument. `nrounds` has been set to `1` and `verbose` to `0` by default. `num_class` is set internally, so do not set this manually.", 
             callees = "xgboost")
     })()
  4: makeRLearnerClassif(cl = "classif.xgboost", package = "xgboost", par.set = makeParamSet(makeDiscreteLearnerParam(id = "booster", 
         default = "gbtree", values = c("gbtree", "gblinear", "dart")), makeUntypedLearnerParam(id = "watchlist", 
         default = NULL, tunable = FALSE), makeNumericLearnerParam(id = "eta", default = 0.3, 
         lower = 0, upper = 1), makeNumericLearnerParam(id = "gamma", default = 0, lower = 0), 
         makeIntegerLearnerParam(id = "max_depth", default = 6L, lower = 1L), makeNumericLearnerParam(id = "min_child_weight", 
             default = 1, lower = 0), makeNumericLearnerParam(id = "subsample", default = 1, 
             lower = 0, upper = 1), makeNumericLearnerParam(id = "colsample_bytree", default = 1, 
             lower = 0, upper = 1), makeNumericLearnerParam(id = "colsample_bylevel", 
             default = 1, lower = 0, upper = 1), makeIntegerLearnerParam(id = "num_parallel_tree", 
             default = 1L, lower = 1L), makeNumericLearnerParam(id = "lambda", default = 1, 
             lower = 0), makeNumericLearnerParam(id = "lambda_bias", default = 0, lower = 0), 
         makeNumericLearnerParam(id = "alpha", default = 0, lower = 0), makeUntypedLearnerParam(id = "objective", 
             default = "binary:logistic", tunable = FALSE), makeUntypedLearnerParam(id = "eval_metric", 
             default = "error", tunable = FALSE), makeNumericLearnerParam(id = "base_score", 
             default = 0.5, tunable = FALSE), makeNumericLearnerParam(id = "max_delta_step", 
             lower = 0, default = 0), makeNumericLearnerParam(id = "missing", default = NULL, 
             tunable = FALSE, when = "both", special.vals = list(NA, NA_real_, NULL)), 
         makeIntegerVectorLearnerParam(id = "monotone_constraints", default = 0, lower = -1, 
             upper = 1), makeNumericLearnerParam(id = "tweedie_variance_power", lower = 1, 
             upper = 2, default = 1.5, requires = quote(objective == "reg:tweedie")), 
         makeIntegerLearnerParam(id = "nthread", lower = 1L, tunable = FALSE), makeIntegerLearnerParam(id = "nrounds", 
             default = 1L, lower = 1L), makeUntypedLearnerParam(id = "feval", default = NULL, 
             tunable = FALSE), makeIntegerLearnerParam(id = "verbose", default = 1L, lower = 0L, 
             upper = 2L, tunable = FALSE), makeIntegerLearnerParam(id = "print_every_n", 
             default = 1L, lower = 1L, tunable = FALSE, requires = quote(verbose == 1L)), 
         makeIntegerLearnerParam(id = "early_stopping_rounds", default = NULL, lower = 1L, 
             special.vals = list(NULL), tunable = FALSE), makeLogicalLearnerParam(id = "maximize", 
             default = NULL, special.vals = list(NULL), tunable = FALSE), makeDiscreteLearnerParam(id = "sample_type", 
             default = "uniform", values = c("uniform", "weighted"), requires = quote(booster == 
                 "dart")), makeDiscreteLearnerParam(id = "normalize_type", default = "tree", 
             values = c("tree", "forest"), requires = quote(booster == "dart")), makeNumericLearnerParam(id = "rate_drop", 
             default = 0, lower = 0, upper = 1, requires = quote(booster == "dart")), 
         makeNumericLearnerParam(id = "skip_drop", default = 0, lower = 0, upper = 1, 
             requires = quote(booster == "dart")), makeUntypedLearnerParam(id = "callbacks", 
             default = list(), tunable = FALSE)), par.vals = list(nrounds = 1L, verbose = 0L), 
         properties = c("twoclass", "multiclass", "numerics", "prob", "weights", "missings", 
             "featimp"), name = "eXtreme Gradient Boosting", short.name = "xgboost", note = "All settings are passed directly, rather than through `xgboost`'s `params` argument. `nrounds` has been set to `1` and `verbose` to `0` by default. `num_class` is set internally, so do not set this manually.", 
         callees = "xgboost")
  5: addClasses(makeRLearnerInternal(cl, "classif", package, par.set, par.vals, properties, 
         name, short.name, note, callees), c(cl, "RLearnerClassif"))
  6: makeRLearnerInternal(cl, "classif", package, par.set, par.vals, properties, name, 
         short.name, note, callees)
  7: requirePackages(package, why = stri_paste("learner", id, sep = " "), default.method = "load")
  8: stopf("For %s please install the following packages: %s", why, ps)
  
  ── 11. Error: db with single cluster doesn't give warnings (@test_base_measures.
  Please install the following packages: clusterSim
  1: expect_warning(crossval("cluster.kmeans", mtcars.task), NA) at testthat/test_base_measures.R:99
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: crossval("cluster.kmeans", mtcars.task)
  7: resample(learner, task, rdesc, measures = measures, models = models, keep.pred = keep.pred, 
         show.info = show.info)
  8: parallelMap(doResampleIteration, seq_len(rin$desc$iters), level = "mlr.resample", 
         more.args = more.args)
  9: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  10: (function (learner, task, rin, i, measures, weights, model, extract, show.info) 
     {
         setSlaveOptions()
         train.i = rin$train.inds[[i]]
         test.i = rin$test.inds[[i]]
         calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
             test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, 
             model = model, extract = extract, show.info = show.info)
     })(dots[[1L]][[2L]], learner = structure(list(id = "cluster.kmeans", type = "cluster", 
         package = c("stats", "clue"), properties = c("numerics", "prob"), par.set = structure(list(
             pars = list(centers = structure(list(id = "centers", type = "untyped", len = 1L, 
                 lower = NULL, upper = NULL, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = FALSE, default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), iter.max = structure(list(id = "iter.max", type = "integer", len = 1L, 
                 lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                 has.default = TRUE, default = 10L, trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), nstart = structure(list(id = "nstart", type = "integer", len = 1L, lower = 1L, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = 1L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                 when = "train"), class = c("LearnerParam", "Param")), algorithm = structure(list(
                 id = "algorithm", type = "discrete", len = 1L, lower = NULL, upper = NULL, 
                 values = list(`Hartigan-Wong` = "Hartigan-Wong", Lloyd = "Lloyd", Forgy = "Forgy", 
                     MacQueen = "MacQueen"), cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                 default = "Hartigan-Wong", trafo = NULL, requires = NULL, tunable = TRUE, 
                 special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
             )), trace = structure(list(id = "trace", type = "logical", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), cnames = NULL, 
                 allow.inf = FALSE, has.default = FALSE, default = NULL, trafo = NULL, 
                 requires = NULL, tunable = FALSE, special.vals = list(), when = "train"), class = c("LearnerParam", 
             "Param"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), 
         par.vals = list(centers = 2L), predict.type = "response", name = "K-Means", short.name = "kmeans", 
         note = "The `predict` method uses `cl_predict` from the `clue` package to compute the cluster memberships for new data. The default `centers = 2` is added so the method runs without setting parameters, but this must in reality of course be changed by the user.", 
         callees = c("kmeans", "cl_predict"), help.list = list(centers = "Argument of: stats::kmeans\n\neither the number of clusters, say k, or a set of initial (distinct) cluster centres.  If a number, a random set of (distinct) rows in x is chosen as the initial centres.", 
             iter.max = "Argument of: stats::kmeans\n\nthe maximum number of iterations allowed.", 
             nstart = "Argument of: stats::kmeans\n\nif centers is a number, how many random sets should be chosen?", 
             algorithm = "Argument of: stats::kmeans\n\ncharacter: may be abbreviated.  Note that \"Lloyd\" and \"Forgy\" are alternative names for one algorithm.", 
             trace = "Argument of: stats::kmeans\n\nlogical or integer number, currently only used in the default method (\"Hartigan-Wong\"): if positive (or true), tracing information on the progress of the algorithm is produced.  Higher values may produce more tracing information."), 
         config = list(), fix.factors.prediction = FALSE), class = c("cluster.kmeans", 
     "RLearnerCluster", "RLearner", "Learner")), task = structure(list(type = "cluster", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "mtcars-example", type = "cluster", target = character(0), size = 32L, 
             n.feat = c(numerics = 11L, factors = 0L, ordered = 0L, functionals = 0L), 
             has.missings = FALSE, has.weights = FALSE, has.blocking = FALSE, has.coordinates = FALSE), class = c("ClusterTaskDesc", 
         "UnsupervisedTaskDesc", "TaskDesc"))), class = c("ClusterTask", "UnsupervisedTask", 
     "Task")), rin = structure(list(desc = structure(list(id = "cross-validation", iters = 10L, 
         predict = "test", stratify = FALSE), class = c("CVDesc", "ResampleDesc")), size = 32L, 
         train.inds = list(c(23L, 25L, 1L, 14L, 22L, 6L, 9L, 27L, 4L, 10L, 32L, 24L, 3L, 
         5L, 21L, 13L, 30L, 31L, 28L, 2L, 15L, 11L, 26L, 12L, 7L, 17L, 19L, 29L, 16L), 
             c(23L, 25L, 1L, 14L, 22L, 9L, 27L, 4L, 10L, 32L, 8L, 24L, 5L, 21L, 18L, 30L, 
             31L, 28L, 2L, 15L, 11L, 26L, 12L, 7L, 17L, 19L, 29L, 20L, 16L), c(23L, 25L, 
             1L, 14L, 22L, 6L, 9L, 4L, 10L, 32L, 8L, 24L, 3L, 5L, 21L, 18L, 13L, 30L, 
             31L, 28L, 15L, 11L, 26L, 12L, 17L, 19L, 29L, 20L, 16L), c(23L, 25L, 1L, 14L, 
             22L, 6L, 9L, 27L, 10L, 32L, 8L, 24L, 3L, 5L, 21L, 18L, 13L, 30L, 31L, 28L, 
             2L, 15L, 11L, 26L, 12L, 7L, 19L, 29L, 20L), c(23L, 25L, 1L, 14L, 22L, 6L, 
             9L, 27L, 4L, 10L, 32L, 8L, 24L, 3L, 21L, 18L, 13L, 31L, 28L, 2L, 15L, 11L, 
             26L, 12L, 7L, 17L, 29L, 20L, 16L), c(25L, 1L, 14L, 22L, 6L, 9L, 27L, 4L, 
             10L, 32L, 8L, 24L, 3L, 5L, 21L, 18L, 13L, 30L, 31L, 2L, 11L, 26L, 12L, 7L, 
             17L, 19L, 29L, 20L, 16L), c(23L, 25L, 1L, 14L, 6L, 27L, 4L, 10L, 32L, 8L, 
             3L, 5L, 21L, 18L, 13L, 30L, 31L, 28L, 2L, 15L, 11L, 26L, 12L, 7L, 17L, 19L, 
             29L, 20L, 16L), c(23L, 1L, 14L, 22L, 6L, 9L, 27L, 4L, 10L, 32L, 8L, 24L, 
             3L, 5L, 21L, 18L, 13L, 30L, 31L, 28L, 2L, 15L, 11L, 12L, 7L, 17L, 19L, 20L, 
             16L), c(23L, 25L, 22L, 6L, 9L, 27L, 4L, 10L, 8L, 24L, 3L, 5L, 18L, 13L, 30L, 
             31L, 28L, 2L, 15L, 11L, 26L, 12L, 7L, 17L, 19L, 29L, 20L, 16L), c(23L, 25L, 
             1L, 14L, 22L, 6L, 9L, 27L, 4L, 32L, 8L, 24L, 3L, 5L, 21L, 18L, 13L, 30L, 
             28L, 2L, 15L, 26L, 7L, 17L, 19L, 29L, 20L, 16L)), test.inds = list(c(8L, 
         18L, 20L), c(3L, 6L, 13L), c(2L, 7L, 27L), c(4L, 16L, 17L), c(5L, 19L, 30L), 
             c(15L, 23L, 28L), c(9L, 22L, 24L), c(25L, 26L, 29L), c(1L, 14L, 21L, 32L), 
             c(10L, 11L, 12L, 31L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         weights = NULL, measures = list(structure(list(id = "db", minimize = TRUE, properties = c("cluster", 
         "req.pred", "req.feats"), fun = function (task, model, pred, feats, extra.args) 
         {
             if (length(unique(pred$data$response)) > 1L) {
                 requirePackages("clusterSim", default.method = "load")
                 r = as.integer(as.factor(pred$data$response))
                 clusterSim::index.DB(feats, r)$DB
             }
             else {
                 NA
             }
         }, extra.args = list(), best = 0, worst = Inf, name = "Davies-Bouldin cluster separation measure", 
             note = "Ratio of the within cluster scatter, to the between cluster separation, averaged over the clusters. See `?clusterSim::index.DB`.", 
             aggr = structure(list(id = "test.mean", name = "Test mean", fun = function (task, 
                 perf.test, perf.train, measure, group, pred) 
             mean(perf.test), properties = "req.test"), class = "Aggregation")), class = "Measure")), 
         model = FALSE, extract = function (model) 
         {
         }, show.info = FALSE)
  11: calculateResampleIterationResult(learner = learner, task = task, i = i, train.i = train.i, 
         test.i = test.i, measures = measures, weights = weights, rdesc = rin$desc, model = model, 
         extract = extract, show.info = show.info)
  12: performance(task = task, model = m, pred = pred.test, measures = measures)
  13: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  14: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  15: FUN(X[[i]], ...)
  16: measure$fun(task, model, pred, feats, m$extra.args)
  17: requirePackages("clusterSim", default.method = "load")
  18: stopf("Please install the following packages: %s", ps)
  
  ── 12. Error: check measure calculations (@test_base_measures.R#657)  ──────────
  there is no package called 'mldr'
  1: expect_equal(mldr::hamming_loss(multi.y, multi.p), measureMultilabelHamloss(multi.y, 
         multi.p)) at testthat/test_base_measures.R:657
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: mldr::hamming_loss
  5: getExportedValue(pkg, name)
  6: asNamespace(ns)
  7: getNamespace(ns)
  8: tryCatch(loadNamespace(name), error = function(e) stop(e))
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  ── 13. Error: plotLearnerPrediction (@test_base_plotLearnerPrediction.R#20)  ───
  Please install the following packages: clusterSim
  1: plotLearnerPrediction("cluster.kmeans", noclass.task, gridsize = gs) at testthat/test_base_plotLearnerPrediction.R:20
  2: performance(pred.train, task = task, measures = measures)
  3: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  4: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  5: FUN(X[[i]], ...)
  6: measure$fun(task, model, pred, feats, m$extra.args)
  7: requirePackages("clusterSim", default.method = "load")
  8: stopf("Please install the following packages: %s", ps)
  
  ── 14. Error: setThreshold does not produce NAs for extreme thresholds (@test_ba
  there is no package called 'caret'
  1: data(GermanCredit, package = "caret") at testthat/test_base_predict.R:102
  2: find.package(package, lib.loc, verbose = verbose)
  3: stop(gettextf("there is no package called %s", sQuote(pkg)), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 3260 SKIPPED: 2 FAILED: 14
  1. Error: basic PreprocWrapperCaret works (@test_base_PreprocWrapperCaret.R#6) 
  2. Error: PreprocessWrapperCaret supports nzv,zv and corr method with different methodparams as default (@test_base_PreprocWrapperCaret.R#36) 
  3. Error: PreprocessWrapperCaret creates the same output as preProcess for methods nzv, zv (@test_base_PreprocWrapperCaret.R#55) 
  4. Error: clustering performance (@test_base_clustering.R#19) 
  5. Error: clustering performance with missing clusters (@test_base_clustering.R#32) 
  6. Error: clustering resample (@test_base_clustering.R#42) 
  7. Error: clustering benchmark (@test_base_clustering.R#55) 
  8. Error: clustering tune (@test_base_clustering.R#72) 
  9. Error: plotFilterValues (@test_base_generateFilterValuesData.R#68) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted