Running ‘run-base.R’ [263s/388s]
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: TuneWrapper uses tune.threshold (@test_base_TuneWrapper.R#64)  ────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: train(lrn, binaryclass.task) at testthat/test_base_TuneWrapper.R:64
  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: fun2(fun3(do.call(trainLearner, pars)))
  6: fun3(do.call(trainLearner, pars))
  7: do.call(trainLearner, pars)
  8: (function (.learner, .task, .subset, .weights = NULL, ...) 
     {
         UseMethod("trainLearner")
     })(.learner = structure(list(id = "classif.lda.tuned", type = "classif", package = "MASS", 
         properties = NULL, par.set = structure(list(pars = structure(list(), .Names = character(0)), 
             forbidden = NULL), class = "ParamSet"), par.vals = structure(list(), .Names = character(0)), 
         predict.type = "prob", fix.factors.prediction = FALSE, next.learner = structure(list(
             id = "classif.lda", type = "classif", package = "MASS", properties = c("twoclass", 
             "multiclass", "numerics", "factors", "prob"), par.set = structure(list(pars = list(
                 method = structure(list(id = "method", type = "discrete", len = 1L, lower = NULL, 
                     upper = NULL, values = list(moment = "moment", mle = "mle", mve = "mve", 
                       t = "t"), cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = "moment", trafo = NULL, requires = NULL, tunable = TRUE, 
                     special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), nu = structure(list(id = "nu", type = "numeric", len = 1L, 
                     lower = 2, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = FALSE, default = NULL, trafo = NULL, requires = method == 
                       "t", tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), tol = structure(list(id = "tol", type = "numeric", len = 1L, 
                     lower = 0, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 1e-04, trafo = NULL, requires = NULL, 
                     tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), predict.method = structure(list(id = "predict.method", type = "discrete", 
                     len = 1L, lower = NULL, upper = NULL, values = list(`plug-in` = "plug-in", 
                       predictive = "predictive", debiased = "debiased"), cnames = NULL, 
                     allow.inf = FALSE, has.default = TRUE, default = "plug-in", trafo = NULL, 
                     requires = NULL, tunable = TRUE, special.vals = list(), when = "predict"), class = c("LearnerParam", 
                 "Param")), CV = structure(list(id = "CV", 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")), prior = structure(list(
                     id = "prior", type = "numericvector", len = NA_integer_, lower = 0, 
                     upper = 1, 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"))), forbidden = NULL), class = c("LearnerParamSet", 
             "ParamSet")), par.vals = structure(list(), .Names = character(0)), predict.type = "prob", 
             name = "Linear Discriminant Analysis", short.name = "lda", note = "Learner parameter `predict.method` maps to `method` in `predict.lda`.", 
             callees = c("lda", "predict.lda"), help.list = list(prior = "Argument of: MASS::lda\n\nthe prior probabilities of class membership.  If unspecified, the class proportions for the training set are used.  If present, the probabilities should be specified in the order of the factor levels.", 
                 method = "Argument of: MASS::lda\n\n\"moment\" for standard estimators of the mean and variance, \"mle\" for MLEs, \"mve\" to use cov.mve, or \"t\" for robust estimates based on a t distribution.", 
                 tol = "Argument of: MASS::lda\n\nA tolerance to decide if a matrix is singular; it will reject variables and linear combinations of unit-variance variables whose variance is less than tol^2.", 
                 CV = "Argument of: MASS::lda\n\nIf true, returns results (classes and posterior probabilities) for leave-one-out cross-validation. Note that if the prior is estimated, the proportions in the whole dataset are used.", 
                 nu = "Argument of: MASS::lda\n\ndegrees of freedom for method = \"t\"."), 
             config = list(), fix.factors.prediction = FALSE), class = c("classif.lda", 
         "RLearnerClassif", "RLearner", "Learner")), model.subclass = "TuneModel", resampling = structure(list(
             split = 0.666666666666667, id = "holdout", iters = 1L, predict = "test", 
             stratify = FALSE), class = c("HoldoutDesc", "ResampleDesc")), measures = list(
             structure(list(id = "costs", minimize = TRUE, properties = c("classif", "classif.multi", 
             "req.pred", "req.truth", "predtype.response", "predtype.prob"), fun = function (task, 
                 model, pred, feats, extra.args) 
             {
                 td = pred$task.desc
                 levs = td$class.levels
                 if (any(dim(costs))) {
                     if (any(dim(costs) != length(levs))) 
                       stop("Dimensions of costs have to be the same as number of class levels!")
                     rns = rownames(costs)
                     cns = colnames(costs)
                     if (!setequal(rns, levs) || !setequal(cns, levs)) 
                       stop("Row and column names of cost matrix have to equal class levels!")
                 }
                 costs = extra.args[[1L]]
                 r = pred$data$response
                 if (anyMissing(r)) 
                     return(NA_real_)
                 cc = function(truth, pred) {
                     costs[truth, pred]
                 }
                 y = mapply(cc, as.character(pred$data$truth), as.character(r))
                 combine(y)
             }, extra.args = list(costs = structure(c(0, 5, 1, 0), .Dim = c(2L, 2L), .Dimnames = list(
                 c("M", "R"), c("M", "R"))), combine = function (x, ...) 
             UseMethod("mean")), best = 0, worst = 5, name = "costs", note = "", 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")), 
         opt.pars = structure(list(pars = list(method = structure(list(id = "method", 
             type = "discrete", len = 1L, lower = NULL, upper = NULL, values = list(moment = "moment"), 
             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"), bit.names = character(0), bits.to.features = function () 
         {
         }, control = structure(list(same.resampling.instance = TRUE, impute.val = NULL, 
             tune.threshold = TRUE, 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(resolution = 10L)), class = c("TuneControlGrid", 
         "TuneControl", "OptControl")), show.info = FALSE), class = c("TuneWrapper", "OptWrapper", 
     "BaseWrapper", "Learner")), .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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), .subset = NULL)
  9: trainLearner.TuneWrapper(.learner = structure(list(id = "classif.lda.tuned", type = "classif", 
         package = "MASS", properties = NULL, par.set = structure(list(pars = structure(list(), .Names = character(0)), 
             forbidden = NULL), class = "ParamSet"), par.vals = structure(list(), .Names = character(0)), 
         predict.type = "prob", fix.factors.prediction = FALSE, next.learner = structure(list(
             id = "classif.lda", type = "classif", package = "MASS", properties = c("twoclass", 
             "multiclass", "numerics", "factors", "prob"), par.set = structure(list(pars = list(
                 method = structure(list(id = "method", type = "discrete", len = 1L, lower = NULL, 
                     upper = NULL, values = list(moment = "moment", mle = "mle", mve = "mve", 
                       t = "t"), cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = "moment", trafo = NULL, requires = NULL, tunable = TRUE, 
                     special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), nu = structure(list(id = "nu", type = "numeric", len = 1L, 
                     lower = 2, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = FALSE, default = NULL, trafo = NULL, requires = method == 
                       "t", tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), tol = structure(list(id = "tol", type = "numeric", len = 1L, 
                     lower = 0, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 1e-04, trafo = NULL, requires = NULL, 
                     tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), predict.method = structure(list(id = "predict.method", type = "discrete", 
                     len = 1L, lower = NULL, upper = NULL, values = list(`plug-in` = "plug-in", 
                       predictive = "predictive", debiased = "debiased"), cnames = NULL, 
                     allow.inf = FALSE, has.default = TRUE, default = "plug-in", trafo = NULL, 
                     requires = NULL, tunable = TRUE, special.vals = list(), when = "predict"), class = c("LearnerParam", 
                 "Param")), CV = structure(list(id = "CV", 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")), prior = structure(list(
                     id = "prior", type = "numericvector", len = NA_integer_, lower = 0, 
                     upper = 1, 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"))), forbidden = NULL), class = c("LearnerParamSet", 
             "ParamSet")), par.vals = structure(list(), .Names = character(0)), predict.type = "prob", 
             name = "Linear Discriminant Analysis", short.name = "lda", note = "Learner parameter `predict.method` maps to `method` in `predict.lda`.", 
             callees = c("lda", "predict.lda"), help.list = list(prior = "Argument of: MASS::lda\n\nthe prior probabilities of class membership.  If unspecified, the class proportions for the training set are used.  If present, the probabilities should be specified in the order of the factor levels.", 
                 method = "Argument of: MASS::lda\n\n\"moment\" for standard estimators of the mean and variance, \"mle\" for MLEs, \"mve\" to use cov.mve, or \"t\" for robust estimates based on a t distribution.", 
                 tol = "Argument of: MASS::lda\n\nA tolerance to decide if a matrix is singular; it will reject variables and linear combinations of unit-variance variables whose variance is less than tol^2.", 
                 CV = "Argument of: MASS::lda\n\nIf true, returns results (classes and posterior probabilities) for leave-one-out cross-validation. Note that if the prior is estimated, the proportions in the whole dataset are used.", 
                 nu = "Argument of: MASS::lda\n\ndegrees of freedom for method = \"t\"."), 
             config = list(), fix.factors.prediction = FALSE), class = c("classif.lda", 
         "RLearnerClassif", "RLearner", "Learner")), model.subclass = "TuneModel", resampling = structure(list(
             split = 0.666666666666667, id = "holdout", iters = 1L, predict = "test", 
             stratify = FALSE), class = c("HoldoutDesc", "ResampleDesc")), measures = list(
             structure(list(id = "costs", minimize = TRUE, properties = c("classif", "classif.multi", 
             "req.pred", "req.truth", "predtype.response", "predtype.prob"), fun = function (task, 
                 model, pred, feats, extra.args) 
             {
                 td = pred$task.desc
                 levs = td$class.levels
                 if (any(dim(costs))) {
                     if (any(dim(costs) != length(levs))) 
                       stop("Dimensions of costs have to be the same as number of class levels!")
                     rns = rownames(costs)
                     cns = colnames(costs)
                     if (!setequal(rns, levs) || !setequal(cns, levs)) 
                       stop("Row and column names of cost matrix have to equal class levels!")
                 }
                 costs = extra.args[[1L]]
                 r = pred$data$response
                 if (anyMissing(r)) 
                     return(NA_real_)
                 cc = function(truth, pred) {
                     costs[truth, pred]
                 }
                 y = mapply(cc, as.character(pred$data$truth), as.character(r))
                 combine(y)
             }, extra.args = list(costs = structure(c(0, 5, 1, 0), .Dim = c(2L, 2L), .Dimnames = list(
                 c("M", "R"), c("M", "R"))), combine = function (x, ...) 
             UseMethod("mean")), best = 0, worst = 5, name = "costs", note = "", 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")), 
         opt.pars = structure(list(pars = list(method = structure(list(id = "method", 
             type = "discrete", len = 1L, lower = NULL, upper = NULL, values = list(moment = "moment"), 
             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"), bit.names = character(0), bits.to.features = function () 
         {
         }, control = structure(list(same.resampling.instance = TRUE, impute.val = NULL, 
             tune.threshold = TRUE, 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(resolution = 10L)), class = c("TuneControlGrid", 
         "TuneControl", "OptControl")), show.info = FALSE), class = c("TuneWrapper", "OptWrapper", 
     "BaseWrapper", "Learner")), .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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), .subset = NULL)
  10: tuneParams(.learner$next.learner, .task, .learner$resampling, .learner$measures, 
         .learner$opt.pars, .learner$control, .learner$show.info)
  ...
  19: optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, nsub = nsub)
  20: optimize(f = f, interval = interval, maximum = maximum, tol = tol)
  21: (function (arg) 
     f(arg, ...))(0.381966011250105)
  22: f(arg, ...)
  23: performance(setThreshold(pred, x), measure, task, model)
  24: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  25: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  26: FUN(X[[i]], ...)
  27: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  28: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 2. Error: TuneWrapper works with nested sampling and threshold tuning, cf. is
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: resample(lrn2, iris.task, rdesc, measures = mmce) at testthat/test_base_TuneWrapper.R:109
  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 = "classif.ksvm.tuned", type = "classif", 
         package = "kernlab", properties = NULL, par.set = structure(list(pars = structure(list(), .Names = character(0)), 
             forbidden = NULL), class = "ParamSet"), par.vals = structure(list(), .Names = character(0)), 
         predict.type = "prob", fix.factors.prediction = FALSE, next.learner = structure(list(
             id = "classif.ksvm", type = "classif", package = "kernlab", properties = c("twoclass", 
             "multiclass", "numerics", "factors", "prob", "class.weights"), par.set = structure(list(
                 pars = list(scaled = structure(list(id = "scaled", type = "logical", 
                     len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, 
                       `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = TRUE, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), type = structure(list(
                     id = "type", type = "discrete", len = 1L, lower = NULL, upper = NULL, 
                     values = list(`C-svc` = "C-svc", `nu-svc` = "nu-svc", `C-bsvc` = "C-bsvc", 
                       `spoc-svc` = "spoc-svc", `kbb-svc` = "kbb-svc"), cnames = NULL, 
                     allow.inf = FALSE, has.default = TRUE, default = "C-svc", trafo = NULL, 
                     requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), kernel = structure(list(id = "kernel", type = "discrete", 
                     len = 1L, lower = NULL, upper = NULL, values = list(vanilladot = "vanilladot", 
                       polydot = "polydot", rbfdot = "rbfdot", tanhdot = "tanhdot", laplacedot = "laplacedot", 
                       besseldot = "besseldot", anovadot = "anovadot", splinedot = "splinedot"), 
                     cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = "rbfdot", 
                     trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), C = structure(list(
                     id = "C", type = "numeric", len = 1L, lower = 0, upper = Inf, values = NULL, 
                     cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 1, 
                     trafo = NULL, requires = type %in% c("C-svc", "C-bsvc", "spoc-svc", 
                       "kbb-svc"), tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), nu = structure(list(id = "nu", type = "numeric", len = 1L, 
                     lower = 0, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 0.2, trafo = NULL, requires = type == 
                       "nu-svc", tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), epsilon = structure(list(id = "epsilon", type = "numeric", 
                     len = 1L, lower = -Inf, upper = Inf, values = NULL, cnames = NULL, 
                     allow.inf = FALSE, has.default = TRUE, default = 0.1, trafo = NULL, 
                     requires = type %in% c("eps-svr", "nu-svr", "eps-bsvm"), tunable = TRUE, 
                     special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), sigma = structure(list(id = "sigma", type = "numeric", len = 1L, 
                     lower = 0, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = FALSE, default = NULL, trafo = NULL, requires = kernel %in% 
                       c("rbfdot", "anovadot", "besseldot", "laplacedot"), tunable = TRUE, 
                     special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), degree = structure(list(id = "degree", type = "integer", len = 1L, 
                     lower = 1L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 3L, trafo = NULL, requires = kernel %in% 
                       c("polydot", "anovadot", "besseldot"), tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), scale = structure(list(
                     id = "scale", type = "numeric", len = 1L, lower = 0, upper = Inf, 
                     values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = 1, trafo = NULL, requires = kernel %in% c("polydot", "tanhdot"), 
                     tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), offset = structure(list(id = "offset", type = "numeric", len = 1L, 
                     lower = -Inf, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 1, trafo = NULL, requires = kernel %in% 
                       c("polydot", "tanhdot"), tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), order = structure(list(
                     id = "order", type = "integer", len = 1L, lower = -Inf, upper = Inf, 
                     values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = 1L, trafo = NULL, requires = kernel == "besseldot", tunable = TRUE, 
                     special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), tol = structure(list(id = "tol", type = "numeric", len = 1L, 
                     lower = 0, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
                     has.default = TRUE, default = 0.001, trafo = NULL, requires = NULL, 
                     tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
                 "Param")), shrinking = structure(list(id = "shrinking", type = "logical", 
                     len = 1L, lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, 
                       `FALSE` = FALSE), cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = TRUE, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), class.weights = structure(list(
                     id = "class.weights", type = "numericvector", len = NA_integer_, 
                     lower = 0, upper = Inf, 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")), fit = structure(list(id = "fit", type = "logical", len = 1L, 
                     lower = NULL, upper = NULL, values = list(`TRUE` = TRUE, `FALSE` = FALSE), 
                     cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = TRUE, 
                     trafo = NULL, requires = NULL, tunable = FALSE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param")), cache = structure(list(
                     id = "cache", type = "integer", len = 1L, lower = 1L, upper = Inf, 
                     values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, 
                     default = 40L, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), 
                     when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
             "ParamSet")), par.vals = list(fit = FALSE), predict.type = "prob", name = "Support Vector Machines", 
             short.name = "ksvm", note = "Kernel parameters have to be passed directly and not by using the `kpar` list in `ksvm`. Note that `fit` has been set to `FALSE` by default for speed.", 
             callees = "ksvm", help.list = list(sigma = "Argument of: kernlab::ksvm\n\nfor the ANOVA kernel \"anovadot\".", 
                 degree = "Argument of: kernlab::ksvm\n\nfor the ANOVA kernel \"anovadot\".", 
                 scale = "Argument of: kernlab::ksvm\n\nfor the Hyperbolic tangent kernel function \"tanhdot\"", 
                 offset = "Argument of: kernlab::ksvm\n\nfor the Hyperbolic tangent kernel function \"tanhdot\"", 
                 order = "Argument of: kernlab::ksvm\n\nfor the Bessel kernel \"besseldot\".", 
                 scaled = "Argument of: kernlab::ksvm\n\nA logical vector indicating the variables to be scaled. If scaled is of length 1, the value is recycled as many times as needed and all non-binary variables are scaled. Per default, data are scaled internally (both x and y variables) to zero mean and unit variance. The center and scale values are returned and used for later predictions.", 
                 type = "Argument of: kernlab::ksvm\n\nksvm can be used for classification , for regression, or for novelty detection. Depending on whether y is a factor or not, the default setting for type is C-svc or eps-svr, respectively, but can be overwritten by setting an explicit value. Valid options are:\n\nC-svc   C classification\n\nnu-svc  nu classification\n\nC-bsvc  bound-constraint svm classification\n\nspoc-svc  Crammer, Singer native multi-class\n\nkbb-svc  Weston, Watkins native multi-class\n\none-svc  novelty detection\n\neps-svr  epsilon regression\n\nnu-svr   nu regression\n\neps-bsvr  bound-constraint svm regression", 
                 kernel = "Argument of: kernlab::ksvm\n\nthe kernel function used in training and predicting. This parameter can be set to any function, of class kernel, which computes the inner product in feature space between two vector arguments (see kernels). kernlab provides the most popular kernel functions which can be used by setting the kernel parameter to the following strings:\n\nrbfdot Radial Basis kernel \"Gaussian\"\n\npolydot Polynomial kernel\n\nvanilladot Linear kernel\n\ntanhdot Hyperbolic tangent kernel\n\nlaplacedot Laplacian kernel\n\nbesseldot Bessel kernel\n\nanovadot ANOVA RBF kernel\n\nsplinedot Spline kernel\n\nstringdot String kernel\n\nSetting the kernel parameter to \"matrix\" treats x as a kernel matrix calling the kernelMatrix interface. The kernel parameter can also be set to a user defined function of class kernel by passing the function name as an argument.", 
                 C = "Argument of: kernlab::ksvm\n\ncost of constraints violation (default: 1) this is the ‘C’-constant of the regularization term in the Lagrange formulation.", 
                 nu = "Argument of: kernlab::ksvm\n\nparameter needed for nu-svc, one-svc, and nu-svr. The nu parameter sets the upper bound on the training error and the lower bound on the fraction of data points to become Support Vectors (default: 0.2).", 
                 epsilon = "Argument of: kernlab::ksvm\n\nepsilon in the insensitive-loss function used for eps-svr, nu-svr and eps-bsvm (default: 0.1)", 
                 class.weights = "Argument of: kernlab::ksvm\n\na named vector of weights for the different classes, used for asymmetric class sizes. Not all factor levels have to be supplied (default weight: 1). All components have to be named.", 
                 cache = "Argument of: kernlab::ksvm\n\ncache memory in MB (default 40)", 
                 tol = "Argument of: kernlab::ksvm\n\ntolerance of termination criterion (default: 0.001)", 
                 shrinking = "Argument of: kernlab::ksvm\n\noption whether to use the shrinking-heuristics (default: TRUE)", 
                 fit = "Argument of: kernlab::ksvm\n\nindicates whether the fitted values should be computed and included in the model or not (default: TRUE)"), 
             class.weights.param = "class.weights", config = list(), fix.factors.prediction = FALSE), class = c("classif.ksvm", 
         "RLearnerClassif", "RLearner", "Learner")), model.subclass = "TuneModel", resampling = structure(list(
             split = 0.666666666666667, id = "holdout", iters = 1L, predict = "test", 
             stratify = FALSE), class = c("HoldoutDesc", "ResampleDesc")), measures = list(
             structure(list(id = "ber", minimize = TRUE, properties = c("classif", "classif.multi", 
             "req.pred", "req.truth"), fun = function (task, model, pred, feats, extra.args) 
             {
                 measureBER(pred$data$truth, pred$data$response)
             }, extra.args = list(), best = 0, worst = 1, name = "Balanced error rate", 
                 note = "Mean of misclassification error rates on all individual classes.", 
                 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"), 
             structure(list(id = "mmce", minimize = TRUE, properties = c("classif", "classif.multi", 
             "req.pred", "req.truth"), fun = function (task, model, pred, feats, extra.args) 
             {
                 measureMMCE(pred$data$truth, pred$data$response)
             }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
                 note = "Defined as: mean(response != truth)", 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")), 
         opt.pars = structure(list(pars = list(C = structure(list(id = "C", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0.5` = 0.5), 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"), 
         bit.names = character(0), bits.to.features = function () 
         {
         }, control = structure(list(same.resampling.instance = TRUE, impute.val = NULL, 
             tune.threshold = TRUE, tune.threshold.args = list(nsub = 2L), 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(resolution = 10L)), class = c("TuneControlGrid", 
         "TuneControl", "OptControl")), show.info = FALSE), class = c("TuneWrapper", "OptWrapper", 
     "BaseWrapper", "Learner")), task = structure(list(type = "classif", env = <environment>, 
         weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "iris-example", type = "classif", target = "Species", 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.levels = c("setosa", 
             "versicolor", "virginica"), positive = NA_character_, negative = NA_character_, 
             class.distribution = structure(c(setosa = 50L, versicolor = 50L, virginica = 50L
             ), .Dim = 3L, .Dimnames = structure(list(c("setosa", "versicolor", "virginica"
             )), .Names = ""), class = "table")), class = c("ClassifTaskDesc", "SupervisedTaskDesc", 
         "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", "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(44L, 118L, 61L, 130L, 138L, 7L, 77L, 128L, 
         79L, 65L, 134L, 64L, 94L, 142L, 14L, 122L, 33L, 6L, 150L, 126L, 116L, 90L, 82L, 
         127L, 83L, 89L, 68L, 74L, 36L, 18L, 147L, 108L, 143L, 146L, 3L, 55L, 87L, 25L, 
         135L, 26L, 16L, 46L, 45L, 40L, 17L, 15L, 113L, 48L, 28L, 114L, 5L, 132L, 137L, 
         12L, 54L, 20L, 97L, 71L, 131L, 35L, 60L, 9L, 34L, 24L, 93L, 39L, 69L, 124L, 66L, 
         112L, 148L, 50L, 56L, 1L, 37L, 106L, 29L, 119L, 111L, 8L, 121L, 47L, 123L, 53L, 
         145L, 92L, 139L, 57L, 115L, 11L, 86L, 85L, 95L, 38L, 70L, 80L, 43L, 100L, 104L, 
         27L)), test.inds = list(c(73L, 141L, 88L, 59L, 21L, 42L, 99L, 78L, 84L, 75L, 
         107L, 76L, 110L, 49L, 2L, 125L, 105L, 149L, 41L, 32L, 58L, 31L, 63L, 19L, 22L, 
         51L, 133L, 98L, 129L, 81L, 72L, 140L, 102L, 103L, 30L, 13L, 52L, 91L, 10L, 120L, 
         136L, 144L, 101L, 62L, 109L, 23L, 96L, 67L, 4L, 117L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         weights = NULL, measures = list(structure(list(id = "mmce", minimize = TRUE, 
             properties = c("classif", "classif.multi", "req.pred", "req.truth"), fun = function (task, 
                 model, pred, feats, extra.args) 
             {
                 measureMMCE(pred$data$truth, pred$data$response)
             }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
             note = "Defined as: mean(response != truth)", 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: train(learner, task, subset = train.i, weights = weights[train.i])
  7: measureTime(fun1({
         learner.model = fun2(fun3(do.call(trainLearner, pars)))
     }))
  8: force(expr)
  9: fun1({
         learner.model = fun2(fun3(do.call(trainLearner, pars)))
     })
  10: fun2(fun3(do.call(trainLearner, pars)))
  ...
  24: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  25: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  26: FUN(newX[, i], ...)
  27: fn(x, ...)
  28: performance(setThreshold(pred, x), measure, task, model)
  29: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  30: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  31: FUN(X[[i]], ...)
  32: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  33: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 3. Error: calculateConfusionMatrix elements are consistent with implemented m
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equivalent(performance(pred, ppv), tp/pp) at testthat/test_base_calculateConfusionMatrix.R:87
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: performance(pred, ppv)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  9: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 4. Error: convertBMRToRankMatrix (@test_base_convertBMRToRankMatrix.R#14)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: convertBMRToRankMatrix(res) at testthat/test_base_convertBMRToRankMatrix.R:14
  2: df[, `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id"]
  3: `[.data.table`(df, , `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id")
  
  ── 5. Error: generateCalibrationData (@test_base_generateCalibration.R#8)  ─────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: generateCalibrationData(pred) at testthat/test_base_generateCalibration.R:8
  2: generateCalibrationData.Prediction(pred)
  3: generateCalibrationData.list(namedList("prediction", obj), breaks, groups, task.id)
  4: lapply(obj, function(pred) {
         df = data.table(truth = getPredictionTruth(pred), getPredictionProbabilities(pred, 
             cl = getTaskClassLevels(td)))
         df = melt(df, id.vars = "truth", value.name = "Probability", variable.name = "Class")
         if (is.null(groups)) {
             break.points = hist(df$Probability, breaks = breaks, plot = FALSE)$breaks
             df$bin = cut(df$Probability, break.points, include.lowest = TRUE, ordered_results = TRUE)
         }
         else {
             requirePackages("Hmisc", default.method = "load", why = "Equal width binning of probabilities.")
             assertInt(groups, lower = 2, upper = length(unique(df$Probability)))
             df$bin = Hmisc::cut2(df$Probability, g = groups, digits = 3)
         }
         fun = function(x) {
             tab = table(x$Class, x$truth)
             s = rowSums(tab)
             as.list(ifelse(s == 0, 0, diag(tab)/s))
         }
         list(data = df, proportion = df[, fun(.SD), by = "bin"])
     })
  5: FUN(X[[i]], ...)
  6: df[, fun(.SD), by = "bin"]
  7: `[.data.table`(df, , fun(.SD), by = "bin")
  
  ── 6. Error: plotFilterValues (@test_base_generateFilterValuesData.R#69)  ──────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: plotFilterValues(fv) at testthat/test_base_generateFilterValuesData.R:69
  2: data[get("method") %in% methods, head(.SD, n.show), by = "method"]
  3: `[.data.table`(data, get("method") %in% methods, head(.SD, n.show), by = "method")
  
  ── 7. Error: 2+ hyperparams (@test_base_generateHyperParsEffect.R#285)  ────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: plotHyperParsEffect(data, x = "C", y = "acc.test.mean", plot.type = "line", partial.dep.learn = "regr.rpart") at testthat/test_base_generateHyperParsEffect.R:285
  2: generatePartialDependenceData(partial.fit, partial.task, x)
  3: parallelMap(mmpf::marginalPrediction, vars = if (interaction) list(features) else as.list(features), 
         more.args = args)
  4: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  5: (function (data, vars, n, model, uniform = TRUE, points, int.points, aggregate.fun = function(x) sum(x)/length(x), 
         predict.fun = function(object, newdata) predict(object, newdata = newdata), weight.fun = NULL) 
     {
         assertFunction(aggregate.fun, args = "x")
         assertFunction(predict.fun, args = c("object", "newdata"))
         design = makeDesign(data, vars, n, uniform, points, int.points)
         preds = predict.fun(model, design)
         if (!is.null(weight.fun)) {
             assertFunction(weight.fun, args = c("design", "data"))
             assertFunction(aggregate.fun, args = c("x", "w"))
             w = weight.fun(design, data)
             mp = data.table(w, preds, design[, vars, drop = FALSE], key = vars)
             mp[, as.list(unlist(lapply(.SD[, !"w", with = FALSE], aggregate.fun, w = w))), 
                 by = vars]
         }
         else {
             mp = data.table(preds, design[, vars, drop = FALSE], key = vars)
             mp[, as.list(unlist(lapply(.SD, aggregate.fun))), by = vars]
         }
     })(vars = dots[[1L]][[1L]], model = structure(list(learner = structure(list(id = "regr.rpart", 
         type = "regr", package = "rpart", properties = c("missings", "numerics", "factors", 
         "ordered", "weights", "featimp"), par.set = structure(list(pars = list(minsplit = structure(list(
             id = "minsplit", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
             cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(xval = 0L), predict.type = "response", name = "Decision Tree", 
         short.name = "rpart", note = "`xval` has been set to `0` by default for speed.", 
         callees = c("rpart", "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines."), 
         config = list(), fix.factors.prediction = FALSE), class = c("regr.rpart", "RLearnerRegr", 
     "RLearner", "Learner")), learner.model = structure(list(frame = structure(list(var = structure(1L, .Label = "<leaf>", class = "factor"), 
         n = 5L, wt = 5, dev = 0.004193115234375, yval = 0.67265625, complexity = 0.01, 
         ncompete = 0L, nsurrogate = 0L), class = "data.frame", row.names = 1L), where = c(`1` = 1L, 
     `2` = 1L, `3` = 1L, `4` = 1L, `5` = 1L), call = rpart::rpart(formula = f, data = d, 
         xval = 0L), terms = acc.test.mean ~ C + sigma + degree, cptable = structure(c(0.01, 
     0, 1), .Dim = c(1L, 3L), .Dimnames = list("1", c("CP", "nsplit", "rel error"))), 
         method = "anova", parms = NULL, control = list(minsplit = 20L, minbucket = 7, 
             cp = 0.01, maxcompete = 4L, maxsurrogate = 5L, usesurrogate = 2L, surrogatestyle = 0L, 
             maxdepth = 30L, xval = 0L), functions = list(summary = function (yval, dev, 
             wt, ylevel, digits) 
         {
             paste0("  mean=", formatg(yval, digits), ", MSE=", formatg(dev/wt, digits))
         }, text = function (yval, dev, wt, ylevel, digits, n, use.n) 
         {
             if (use.n) 
                 paste0(formatg(yval, digits), "\nn=", n)
             else formatg(yval, digits)
         }), numresp = 1L, y = c(`1` = 0.65234375, `2` = 0.6796875, `3` = 0.7265625, `4` = 0.65234375, 
         `5` = 0.65234375), ordered = c(C = FALSE, sigma = FALSE, degree = FALSE)), xlevels = structure(list(), .Names = character(0)), class = "rpart"), 
         task.desc = structure(list(id = "par_dep", type = "regr", target = "acc.test.mean", 
             size = 5L, n.feat = c(numerics = 3L, factors = 0L, ordered = 0L, functionals = 0L
             ), has.missings = FALSE, has.weights = FALSE, has.blocking = FALSE, has.coordinates = FALSE), class = c("RegrTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), subset = 1:5, features = c("C", "sigma", 
         "degree"), factor.levels = structure(list(), .Names = character(0)), time = 0.0040000000000191, 
         dump = NULL), class = "WrappedModel"), data = structure(list(C = c(-2.97912544570863, 
     2.5609801383689, 2.35558403655887, 0.149656347930431, -2.96959950122982), sigma = c(3.52780389599502, 
     0.625168087426573, 0.492797938641161, 3.15767947584391, 3.48107680445537), degree = c(4L, 
     3L, 3L, 4L, 3L), acc.test.mean = c(0.65234375, 0.6796875, 0.7265625, 0.65234375, 
     0.65234375)), class = "data.frame", row.names = c(NA, -5L)), uniform = TRUE, aggregate.fun = function (x, 
         ...) 
     UseMethod("mean"), predict.fun = function (object, newdata, ...) 
     {
         pred = do.call("predict", c(list(object = object, newdata = newdata), list(...)))
         point = switch(object$task.desc$type, regr = getPredictionResponse(pred), surv = getPredictionResponse(pred), 
             classif = if (object$learner$predict.type == "response") getPredictionResponse(pred) else getPredictionProbabilities(pred))
         if (object$learner$predict.type == "se") 
             cbind(preds = point, se = getPredictionSE(pred))
         else point
     }, n = c(10, 5))
  6: mp[, as.list(unlist(lapply(.SD, aggregate.fun))), by = vars]
  7: `[.data.table`(mp, , as.list(unlist(lapply(.SD, aggregate.fun))), by = vars)
  
  ── 8. Error: generatePartialDependenceData (@test_base_generatePartialDependence
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: generatePartialDependenceData(fr, input = regr.task, features = c("lstat", "chas"), 
         interaction = TRUE, n = m) at testthat/test_base_generatePartialDependence.R:8
  2: parallelMap(mmpf::marginalPrediction, vars = if (interaction) list(features) else as.list(features), 
         more.args = args)
  3: mapply(fun2, ..., MoreArgs = more.args, SIMPLIFY = FALSE, USE.NAMES = FALSE)
  4: (function (data, vars, n, model, uniform = TRUE, points, int.points, aggregate.fun = function(x) sum(x)/length(x), 
         predict.fun = function(object, newdata) predict(object, newdata = newdata), weight.fun = NULL) 
     {
         assertFunction(aggregate.fun, args = "x")
         assertFunction(predict.fun, args = c("object", "newdata"))
         design = makeDesign(data, vars, n, uniform, points, int.points)
         preds = predict.fun(model, design)
         if (!is.null(weight.fun)) {
             assertFunction(weight.fun, args = c("design", "data"))
             assertFunction(aggregate.fun, args = c("x", "w"))
             w = weight.fun(design, data)
             mp = data.table(w, preds, design[, vars, drop = FALSE], key = vars)
             mp[, as.list(unlist(lapply(.SD[, !"w", with = FALSE], aggregate.fun, w = w))), 
                 by = vars]
         }
         else {
             mp = data.table(preds, design[, vars, drop = FALSE], key = vars)
             mp[, as.list(unlist(lapply(.SD, aggregate.fun))), by = vars]
         }
     })(vars = dots[[1L]][[1L]], model = structure(list(learner = structure(list(id = "regr.rpart", 
         type = "regr", package = "rpart", properties = c("missings", "numerics", "factors", 
         "ordered", "weights", "featimp"), par.set = structure(list(pars = list(minsplit = structure(list(
             id = "minsplit", type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, 
             cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param"))), forbidden = NULL), class = c("LearnerParamSet", 
         "ParamSet")), par.vals = list(xval = 0L), predict.type = "response", name = "Decision Tree", 
         short.name = "rpart", note = "`xval` has been set to `0` by default for speed.", 
         callees = c("rpart", "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines."), 
         config = list(), fix.factors.prediction = FALSE), class = c("regr.rpart", "RLearnerRegr", 
     "RLearner", "Learner")), learner.model = structure(list(frame = structure(list(var = structure(c(5L, 
     4L, 2L, 1L, 1L, 3L, 5L, 1L, 1L, 1L, 5L, 4L, 1L, 1L, 1L), .Label = c("<leaf>", "crim", 
     "dis", "lstat", "rm"), class = "factor"), n = c(506L, 430L, 175L, 74L, 101L, 255L, 
     248L, 193L, 55L, 7L, 76L, 46L, 7L, 39L, 30L), wt = c(506, 430, 175, 74, 101, 255, 
     248, 193, 55, 7, 76, 46, 7, 39, 30), dev = c(42716.2954150198, 17317.3210465116, 
     3373.2512, 1085.90540540541, 1150.53702970297, 6632.21749019608, 3658.39338709677, 
     1589.81440414508, 643.169090909091, 1429.02, 6059.41934210526, 1899.61217391304, 
     432.997142857143, 789.512307692307, 1098.84966666667), yval = c(22.5328063241107, 
     19.9337209302326, 14.956, 11.9783783783784, 17.1376237623762, 23.3498039215686, 22.9362903225807, 
     21.6564766839378, 27.4272727272727, 38, 37.2381578947369, 32.1130434782609, 23.0571428571429, 
     33.7384615384615, 45.0966666666667), complexity = c(0.452744200743653, 0.171172436309741, 
     0.0266129998832225, 0.00726538546066989, 0.00612633485521087, 0.0361642808228198, 
     0.0333692301308836, 0.00693108731131264, 0.0045609247544168, 0.01, 0.0716578409196334, 
     0.0158511574279803, 0.01, 0.00312064924584062, 0.00824544836717579), ncompete = c(4L, 
     4L, 4L, 0L, 0L, 4L, 4L, 0L, 0L, 0L, 4L, 4L, 0L, 0L, 0L), nsurrogate = c(5L, 5L, 5L, 
     0L, 0L, 1L, 4L, 0L, 0L, 0L, 5L, 5L, 0L, 0L, 0L)), class = "data.frame", row.names = c(1L, 
     2L, 4L, 8L, 9L, 5L, 10L, 20L, 21L, 11L, 3L, 6L, 12L, 13L, 7L)), where = c(`1` = 9L, 
     `2` = 8L, `3` = 14L, `4` = 14L, `5` = 14L, `6` = 8L, `7` = 8L, `8` = 5L, `9` = 5L, 
     `10` = 5L, `11` = 5L, `12` = 8L, `13` = 5L, `14` = 8L, `15` = 8L, `16` = 8L, `17` = 8L, 
     `18` = 5L, `19` = 8L, `20` = 8L, `21` = 5L, `22` = 8L, `23` = 5L, `24` = 5L, `25` = 5L, 
     `26` = 5L, `27` = 5L, `28` = 5L, `29` = 8L, `30` = 9L, `31` = 5L, `32` = 8L, `33` = 5L, 
     `34` = 5L, `35` = 5L, `36` = 8L, `37` = 8L, `38` = 8L, `39` = 8L, `40` = 9L, `41` = 14L, 
     `42` = 9L, `43` = 8L, `44` = 8L, `45` = 8L, `46` = 8L, `47` = 8L, `48` = 5L, `49` = 5L, 
     `50` = 5L, `51` = 8L, `52` = 8L, `53` = 8L, `54` = 8L, `55` = 5L, `56` = 14L, `57` = 8L, 
     `58` = 9L, `59` = 8L, `60` = 8L, `61` = 8L, `62` = 5L, `63` = 8L, `64` = 9L, `65` = 14L, 
     `66` = 8L, `67` = 8L, `68` = 8L, `69` = 8L, `70` = 8L, `71` = 8L, `72` = 8L, `73` = 8L, 
     `74` = 8L, `75` = 8L, `76` = 8L, `77` = 8L, `78` = 8L, `79` = 8L, `80` = 8L, `81` = 9L, 
     `82` = 9L, `83` = 8L, `84` = 8L, `85` = 8L, `86` = 9L, `87` = 8L, `88` = 8L, `89` = 14L, 
     `90` = 14L, `91` = 8L, `92` = 8L, `93` = 8L, `94` = 8L, `95` = 8L, `96` = 9L, `97` = 8L, 
     `98` = 15L, `99` = 15L, `100` = 14L, `101` = 9L, `102` = 9L, `103` = 8L, `104` = 8L, 
     `105` = 8L, `106` = 5L, `107` = 5L, `108` = 8L, `109` = 8L, `110` = 5L, `111` = 8L, 
     `112` = 9L, `113` = 5L, `114` = 5L, `115` = 8L, `116` = 5L, `117` = 8L, `118` = 8L, 
     `119` = 5L, `120` = 8L, `121` = 8L, `122` = 8L, `123` = 5L, `124` = 5L, `125` = 5L, 
     `126` = 5L, `127` = 5L, `128` = 5L, `129` = 5L, `130` = 5L, `131` = 8L, `132` = 8L, 
     `133` = 8L, `134` = 5L, `135` = 5L, `136` = 5L, `137` = 5L, `138` = 5L, `139` = 5L, 
     `140` = 5L, `141` = 5L, `142` = 5L, `143` = 5L, `144` = 5L, `145` = 5L, `146` = 5L, 
     `147` = 5L, `148` = 5L, `149` = 5L, `150` = 5L, `151` = 8L, `152` = 8L, `153` = 8L, 
     `154` = 5L, `155` = 5L, `156` = 5L, `157` = 5L, `158` = 14L, `159` = 8L, `160` = 8L, 
     `161` = 8L, `162` = 15L, `163` = 15L, `164` = 15L, `165` = 8L, `166` = 8L, `167` = 15L, 
     `168` = 8L, `169` = 8L, `170` = 8L, `171` = 5L, `172` = 8L, `173` = 5L, `174` = 8L, 
     `175` = 8L, `176` = 9L, `177` = 8L, `178` = 8L, `179` = 9L, `180` = 14L, `181` = 15L, 
     `182` = 8L, `183` = 14L, `184` = 9L, `185` = 8L, `186` = 8L, `187` = 15L, `188` = 9L, 
     `189` = 9L, `190` = 14L, `191` = 14L, `192` = 9L, `193` = 14L, `194` = 9L, `195` = 9L, 
     `196` = 15L, `197` = 14L, `198` = 14L, `199` = 14L, `200` = 14L, `201` = 14L, `202` = 8L, 
     `203` = 15L, `204` = 15L, `205` = 15L, `206` = 8L, `207` = 8L, `208` = 5L, `209` = 5L, 
     `210` = 5L, `211` = 5L, `212` = 5L, `213` = 5L, `214` = 8L, `215` = 5L, `216` = 8L, 
     `217` = 8L, `218` = 9L, `219` = 5L, `220` = 8L, `221` = 13L, `222` = 5L, `223` = 9L, 
     `224` = 9L, `225` = 15L, `226` = 15L, `227` = 15L, `228` = 14L, `229` = 15L, `230` = 9L, 
     `231` = 8L, `232` = 14L, `233` = 15L, `234` = 15L, `235` = 9L, `236` = 8L, `237` = 9L, 
     `238` = 14L, `239` = 8L, `240` = 9L, `241` = 9L, `242` = 8L, `243` = 8L, `244` = 8L, 
     `245` = 8L, `246` = 5L, `247` = 8L, `248` = 8L, `249` = 8L, `250` = 9L, `251` = 8L, 
     `252` = 8L, `253` = 14L, `254` = 15L, `255` = 8L, `256` = 8L, `257` = 15L, `258` = 15L, 
     `259` = 14L, `260` = 9L, `261` = 14L, `262` = 15L, `263` = 15L, `264` = 13L, `265` = 14L, 
     `266` = 8L, `267` = 13L, `268` = 15L, `269` = 15L, `270` = 8L, `271` = 8L, `272` = 8L, 
     `273` = 8L, `274` = 15L, `275` = 9L, `276` = 9L, `277` = 14L, `278` = 9L, `279` = 8L, 
     `280` = 9L, `281` = 15L, `282` = 14L, `283` = 15L, `284` = 15L, `285` = 14L, `286` = 8L, 
     `287` = 8L, `288` = 8L, `289` = 8L, `290` = 9L, `291` = 9L, `292` = 14L, `293` = 9L, 
     `294` = 8L, `295` = 8L, `296` = 9L, `297` = 9L, `298` = 5L, `299` = 8L, `300` = 14L, 
     `301` = 9L, `302` = 9L, `303` = 8L, `304` = 14L, `305` = 14L, `306` = 9L, `307` = 14L, 
     `308` = 9L, `309` = 9L, `310` = 8L, `311` = 8L, `312` = 8L, `313` = 8L, `314` = 8L, 
     `315` = 9L, `316` = 8L, `317` = 5L, `318` = 5L, `319` = 8L, `320` = 8L, `321` = 8L, 
     `322` = 8L, `323` = 8L, `324` = 8L, `325` = 8L, `326` = 8L, `327` = 8L, `328` = 8L, 
     `329` = 8L, `330` = 8L, `331` = 8L, `332` = 8L, `333` = 8L, `334` = 8L, `335` = 8L, 
     `336` = 8L, `337` = 8L, `338` = 8L, `339` = 8L, `340` = 8L, `341` = 8L, `342` = 14L, 
     `343` = 8L, `344` = 9L, `345` = 9L, `346` = 8L, `347` = 8L, `348` = 8L, `349` = 9L, 
     `350` = 9L, `351` = 8L, `352` = 9L, `353` = 8L, `354` = 9L, `355` = 8L, `356` = 8L, 
     `357` = 4L, `358` = 8L, `359` = 8L, `360` = 8L, `361` = 8L, `362` = 8L, `363` = 8L, 
     `364` = 5L, `365` = 15L, `366` = 8L, `367` = 8L, `368` = 10L, `369` = 10L, `370` = 10L, 
     `371` = 14L, `372` = 10L, `373` = 10L, `374` = 4L, `375` = 4L, `376` = 13L, `377` = 4L, 
     `378` = 4L, `379` = 4L, `380` = 4L, `381` = 13L, `382` = 4L, `383` = 4L, `384` = 4L, 
     `385` = 4L, `386` = 4L, `387` = 4L, `388` = 4L, `389` = 4L, `390` = 4L, `391` = 5L, 
     `392` = 5L, `393` = 4L, `394` = 4L, `395` = 4L, `396` = 4L, `397` = 5L, `398` = 4L, 
     `399` = 4L, `400` = 4L, `401` = 4L, `402` = 4L, `403` = 4L, `404` = 4L, `405` = 4L, 
     `406` = 4L, `407` = 4L, `408` = 10L, `409` = 4L, `410` = 4L, `411` = 10L, `412` = 4L, 
     `413` = 4L, `414` = 4L, `415` = 4L, `416` = 4L, `417` = 4L, `418` = 4L, `419` = 4L, 
     `420` = 4L, `421` = 4L, `422` = 4L, `423` = 8L, `424` = 4L, `425` = 4L, `426` = 4L, 
     `427` = 4L, `428` = 4L, `429` = 4L, `430` = 4L, `431` = 4L, `432` = 4L, `433` = 8L, 
     `434` = 5L, `435` = 4L, `436` = 4L, `437` = 4L, `438` = 4L, `439` = 4L, `440` = 4L, 
     `441` = 4L, `442` = 4L, `443` = 5L, `444` = 4L, `445` = 4L, `446` = 4L, `447` = 5L, 
     `448` = 4L, `449` = 4L, `450` = 4L, `451` = 5L, `452` = 5L, `453` = 5L, `454` = 13L, 
     `455` = 4L, `456` = 5L, `457` = 5L, `458` = 4L, `459` = 4L, `460` = 5L, `461` = 5L, 
     `462` = 5L, `463` = 8L, `464` = 8L, `465` = 8L, `466` = 8L, `467` = 5L, `468` = 5L, 
     `469` = 4L, `470` = 4L, `471` = 5L, `472` = 8L, `473` = 8L, `474` = 13L, `475` = 4L, 
     `476` = 5L, `477` = 5L, `478` = 4L, `479` = 4L, `480` = 8L, `481` = 8L, `482` = 9L, 
     `483` = 14L, `484` = 8L, `485` = 8L, `486` = 8L, `487` = 5L, `488` = 8L, `489` = 5L, 
     `490` = 5L, `491` = 5L, `492` = 5L, `493` = 8L, `494` = 8L, `495` = 8L, `496` = 5L, 
     `497` = 5L, `498` = 8L, `499` = 8L, `500` = 5L, `501` = 8L, `502` = 9L, `503` = 8L, 
     `504` = 14L, `505` = 9L, `506` = 8L), call = rpart::rpart(formula = f, data = d, 
         xval = 0L), terms = medv ~ crim + zn + indus + chas + nox + rm + age + dis + 
         rad + tax + ptratio + b + lstat, cptable = structure(c(0.452744200743653, 0.171172436309741, 
     0.0716578409196334, 0.0361642808228198, 0.0333692301308836, 0.0266129998832225, 0.0158511574279803, 
     0.01, 0, 1, 2, 3, 4, 5, 6, 7, 1, 0.547255799256347, 0.376083362946606, 0.304425522026973, 
     0.268261241204153, 0.234892011073269, 0.208279011190047, 0.192427853762067), .Dim = c(8L, 
     3L), .Dimnames = list(c("1", "2", "3", "4", "5", "6", "7", "8"), c("CP", "nsplit", 
     "rel error"))), method = "anova", parms = NULL, control = list(minsplit = 20L, minbucket = 7, 
         cp = 0.01, maxcompete = 4L, maxsurrogate = 5L, usesurrogate = 2L, surrogatestyle = 0L, 
         maxdepth = 30L, xval = 0L), functions = list(summary = function (yval, dev, wt, 
         ylevel, digits) 
     {
         paste0("  mean=", formatg(yval, digits), ", MSE=", formatg(dev/wt, digits))
     }, text = function (yval, dev, wt, ylevel, digits, n, use.n) 
     {
         if (use.n) 
             paste0(formatg(yval, digits), "\nn=", n)
         else formatg(yval, digits)
     }), numresp = 1L, splits = structure(c(506, 506, 506, 506, 506, 0, 0, 0, 0, 0, 430, 
     430, 430, 430, 430, 0, 0, 0, 0, 0, 175, 175, 175, 175, 175, 0, 0, 0, 0, 0, 255, 255, 
     255, 255, 255, 0, 248, 248, 248, 248, 248, 0, 0, 0, 0, 76, 76, 76, 76, 76, 0, 0, 
     0, 0, 0, 46, 46, 46, 46, 46, 0, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 
     1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 2, -1, -1, 
     1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 
     1, 1, 0.452744200743653, 0.442364999845982, 0.25946129831938, 0.244372660990011, 
     0.22324557783938, 0.891304347826087, 0.875494071146245, 0.861660079051383, 0.861660079051383, 
     0.851778656126482, 0.422227683870793, 0.277545484889742, 0.248362162927265, 0.219932806172527, 
     0.208943467285108, 0.813953488372093, 0.781395348837209, 0.781395348837209, 0.781395348837209, 
     0.774418604651163, 0.337006851103062, 0.330792620504565, 0.292724363254028, 0.282585841067922, 
     0.269649684430339, 0.88, 0.857142857142857, 0.76, 0.737142857142857, 0.72, 0.232924222612252, 
     0.220840855732772, 0.217209918262854, 0.0662993322014098, 0.0622382658678198, 0.984313725490196, 
     0.389627287505511, 0.335601248829606, 0.151434914504676, 0.121295984599442, 0.120703608595938, 
     0.838709677419355, 0.794354838709677, 0.790322580645161, 0.782258064516129, 0.505156901793509, 
     0.331891415977078, 0.249878595548787, 0.213940212584408, 0.213940212584406, 0.776315789473684, 
     0.671052631578947, 0.657894736842105, 0.644736842105263, 0.644736842105263, 0.356442611108781, 
     0.248141152497371, 0.179308943356149, 0.166392725808947, 0.15214882112755, 0.91304347826087, 
     0.91304347826087, 0.891304347826087, 0.891304347826087, 0.869565217391304, 6.941, 
     9.725, 6.66, 19.9, 0.6695, 4.83, 14.55, 87.5, 1.605, 0.013355, 14.4, 0.6695, 5.84803, 
     19.9, 75.75, 84.3, 16.57, 0.5765, 2.23935, 434.5, 6.99237, 0.607, 2.0037, 567.5, 
     19.83, 16, 567.5, 0.657, 2.202, 20.15, 1.5511, 4.91, 6.543, 4.866945, 1, 8.053285, 
     6.543, 7.685, 0.5125, 18.35, 4.1, 5.055, 0.017895, 31.5, 10.648, 7.437, 4.68, 19.7, 
     16, 2.742235, 3.99, 14.75, 389.885, 0.11276, 18.84, 9.65, 19.7, 7.5, 0.639, 9.5, 
     0.724605, 0.659, 16, 534.5, 15.015, 0, 0, 0, 0, 0, 0.276315789473684, 0.171052631578948, 
     0.0789473684210529, 0.0789473684210529, 0.013157894736842, 0, 0, 0, 0, 0, 0.542857142857143, 
     0.462857142857143, 0.462857142857143, 0.462857142857143, 0.445714285714286, 0, 0, 
     0, 0, 0, 0.716216216216216, 0.662162162162162, 0.432432432432432, 0.378378378378378, 
     0.337837837837838, 0, 0, 0, 0, 0, 0.428571428571427, 0, 0, 0, 0, 0, 0.272727272727273, 
     0.0727272727272727, 0.0545454545454545, 0.0181818181818182, 0, 0, 0, 0, 0, 0.433333333333333, 
     0.166666666666667, 0.133333333333333, 0.1, 0.1, 0, 0, 0, 0, 0, 0.428571428571428, 
     0.428571428571428, 0.285714285714286, 0.285714285714286, 0.142857142857143), .Dim = c(65L, 
     5L), .Dimnames = list(c("rm", "lstat", "indus", "ptratio", "nox", "lstat", "ptratio", 
     "zn", "indus", "crim", "lstat", "nox", "crim", "ptratio", "age", "age", "indus", 
     "nox", "dis", "tax", "crim", "nox", "dis", "tax", "lstat", "rad", "tax", "nox", "dis", 
     "ptratio", "dis", "lstat", "rm", "crim", "chas", "crim", "rm", "lstat", "nox", "ptratio", 
     "indus", "lstat", "crim", "zn", "dis", "rm", "lstat", "ptratio", "rad", "crim", "lstat", 
     "ptratio", "b", "crim", "indus", "lstat", "ptratio", "rad", "nox", "indus", "crim", 
     "nox", "rad", "tax", "indus"), c("count", "ncat", "improve", "index", "adj"))), csplit = structure(c(1L, 
     3L), .Dim = 1:2), variable.importance = c(rm = 23825.9224199711, lstat = 15047.9425645724, 
     dis = 5385.20759421449, indus = 5313.9747770392, tax = 4205.20672093006, ptratio = 4202.29837958576, 
     nox = 4166.12295149161, age = 3969.29127914272, crim = 2753.2843010755, zn = 1604.55660624371, 
     rad = 1007.65879311314, b = 408.127666870074), y = c(`1` = 24, `2` = 21.6, `3` = 34.7, 
     `4` = 33.4, `5` = 36.2, `6` = 28.7, `7` = 22.9, `8` = 27.1, `9` = 16.5, `10` = 18.9, 
     `11` = 15, `12` = 18.9, `13` = 21.7, `14` = 20.4, `15` = 18.2, `16` = 19.9, `17` = 23.1, 
     `18` = 17.5, `19` = 20.2, `20` = 18.2, `21` = 13.6, `22` = 19.6, `23` = 15.2, `24` = 14.5, 
     `25` = 15.6, `26` = 13.9, `27` = 16.6, `28` = 14.8, `29` = 18.4, `30` = 21, `31` = 12.7, 
     `32` = 14.5, `33` = 13.2, `34` = 13.1, `35` = 13.5, `36` = 18.9, `37` = 20, `38` = 21, 
     `39` = 24.7, `40` = 30.8, `41` = 34.9, `42` = 26.6, `43` = 25.3, `44` = 24.7, `45` = 21.2, 
     `46` = 19.3, `47` = 20, `48` = 16.6, `49` = 14.4, `50` = 19.4, `51` = 19.7, `52` = 20.5, 
     `53` = 25, `54` = 23.4, `55` = 18.9, `56` = 35.4, `57` = 24.7, `58` = 31.6, `59` = 23.3, 
     `60` = 19.6, `61` = 18.7, `62` = 16, `63` = 22.2, `64` = 25, `65` = 33, `66` = 23.5, 
     `67` = 19.4, `68` = 22, `69` = 17.4, `70` = 20.9, `71` = 24.2, `72` = 21.7, `73` = 22.8, 
     `74` = 23.4, `75` = 24.1, `76` = 21.4, `77` = 20, `78` = 20.8, `79` = 21.2, `80` = 20.3, 
     `81` = 28, `82` = 23.9, `83` = 24.8, `84` = 22.9, `85` = 23.9, `86` = 26.6, `87` = 22.5, 
     `88` = 22.2, `89` = 23.6, `90` = 28.7, `91` = 22.6, `92` = 22, `93` = 22.9, `94` = 25, 
     `95` = 20.6, `96` = 28.4, `97` = 21.4, `98` = 38.7, `99` = 43.8, `100` = 33.2, `101` = 27.5, 
     `102` = 26.5, `103` = 18.6, `104` = 19.3, `105` = 20.1, `106` = 19.5, `107` = 19.5, 
     `108` = 20.4, `109` = 19.8, `110` = 19.4, `111` = 21.7, `112` = 22.8, `113` = 18.8, 
     `114` = 18.7, `115` = 18.5, `116` = 18.3, `117` = 21.2, `118` = 19.2, `119` = 20.4, 
     `120` = 19.3, `121` = 22, `122` = 20.3, `123` = 20.5, `124` = 17.3, `125` = 18.8, 
     `126` = 21.4, `127` = 15.7, `128` = 16.2, `129` = 18, `130` = 14.3, `131` = 19.2, 
     `132` = 19.6, `133` = 23, `134` = 18.4, `135` = 15.6, `136` = 18.1, `137` = 17.4, 
     `138` = 17.1, `139` = 13.3, `140` = 17.8, `141` = 14, `142` = 14.4, `143` = 13.4, 
     `144` = 15.6, `145` = 11.8, `146` = 13.8, `147` = 15.6, `148` = 14.6, `149` = 17.8, 
     `150` = 15.4, `151` = 21.5, `152` = 19.6, `153` = 15.3, `154` = 19.4, `155` = 17, 
     `156` = 15.6, `157` = 13.1, `158` = 41.3, `159` = 24.3, `160` = 23.3, `161` = 27, 
     `162` = 50, `163` = 50, `164` = 50, `165` = 22.7, `166` = 25, `167` = 50, `168` = 23.8, 
     `169` = 23.8, `170` = 22.3, `171` = 17.4, `172` = 19.1, `173` = 23.1, `174` = 23.6, 
     `175` = 22.6, `176` = 29.4, `177` = 23.2, `178` = 24.6, `179` = 29.9, `180` = 37.2, 
     `181` = 39.8, `182` = 36.2, `183` = 37.9, `184` = 32.5, `185` = 26.4, `186` = 29.6, 
     `187` = 50, `188` = 32, `189` = 29.8, `190` = 34.9, `191` = 37, `192` = 30.5, `193` = 36.4, 
     `194` = 31.1, `195` = 29.1, `196` = 50, `197` = 33.3, `198` = 30.3, `199` = 34.6, 
     `200` = 34.9, `201` = 32.9, `202` = 24.1, `203` = 42.3, `204` = 48.5, `205` = 50, 
     `206` = 22.6, `207` = 24.4, `208` = 22.5, `209` = 24.4, `210` = 20, `211` = 21.7, 
     `212` = 19.3, `213` = 22.4, `214` = 28.1, `215` = 23.7, `216` = 25, `217` = 23.3, 
     `218` = 28.7, `219` = 21.5, `220` = 23, `221` = 26.7, `222` = 21.7, `223` = 27.5, 
     `224` = 30.1, `225` = 44.8, `226` = 50, `227` = 37.6, `228` = 31.6, `229` = 46.7, 
     `230` = 31.5, `231` = 24.3, `232` = 31.7, `233` = 41.7, `234` = 48.3, `235` = 29, 
     `236` = 24, `237` = 25.1, `238` = 31.5, `239` = 23.7, `240` = 23.3, `241` = 22, `242` = 20.1, 
     `243` = 22.2, `244` = 23.7, `245` = 17.6, `246` = 18.5, `247` = 24.3, `248` = 20.5, 
     `249` = 24.5, `250` = 26.2, `251` = 24.4, `252` = 24.8, `253` = 29.6, `254` = 42.8, 
     `255` = 21.9, `256` = 20.9, `257` = 44, `258` = 50, `259` = 36, `260` = 30.1, `261` = 33.8, 
     `262` = 43.1, `263` = 48.8, `264` = 31, `265` = 36.5, `266` = 22.8, `267` = 30.7, 
     `268` = 50, `269` = 43.5, `270` = 20.7, `271` = 21.1, `272` = 25.2, `273` = 24.4, 
     `274` = 35.2, `275` = 32.4, `276` = 32, `277` = 33.2, `278` = 33.1, `279` = 29.1, 
     `280` = 35.1, `281` = 45.4, `282` = 35.4, `283` = 46, `284` = 50, `285` = 32.2, `286` = 22, 
     `287` = 20.1, `288` = 23.2, `289` = 22.3, `290` = 24.8, `291` = 28.5, `292` = 37.3, 
     `293` = 27.9, `294` = 23.9, `295` = 21.7, `296` = 28.6, `297` = 27.1, `298` = 20.3, 
     `299` = 22.5, `300` = 29, `301` = 24.8, `302` = 22, `303` = 26.4, `304` = 33.1, `305` = 36.1, 
     `306` = 28.4, `307` = 33.4, `308` = 28.2, `309` = 22.8, `310` = 20.3, `311` = 16.1, 
     `312` = 22.1, `313` = 19.4, `314` = 21.6, `315` = 23.8, `316` = 16.2, `317` = 17.8, 
     `318` = 19.8, `319` = 23.1, `320` = 21, `321` = 23.8, `322` = 23.1, `323` = 20.4, 
     `324` = 18.5, `325` = 25, `326` = 24.6, `327` = 23, `328` = 22.2, `329` = 19.3, `330` = 22.6, 
     `331` = 19.8, `332` = 17.1, `333` = 19.4, `334` = 22.2, `335` = 20.7, `336` = 21.1, 
     `337` = 19.5, `338` = 18.5, `339` = 20.6, `340` = 19, `341` = 18.7, `342` = 32.7, 
     `343` = 16.5, `344` = 23.9, `345` = 31.2, `346` = 17.5, `347` = 17.2, `348` = 23.1, 
     `349` = 24.5, `350` = 26.6, `351` = 22.9, `352` = 24.1, `353` = 18.6, `354` = 30.1, 
     `355` = 18.2, `356` = 20.6, `357` = 17.8, `358` = 21.7, `359` = 22.7, `360` = 22.6, 
     `361` = 25, `362` = 19.9, `363` = 20.8, `364` = 16.8, `365` = 21.9, `366` = 27.5, 
     `367` = 21.9, `368` = 23.1, `369` = 50, `370` = 50, `371` = 50, `372` = 50, `373` = 50, 
     `374` = 13.8, `375` = 13.8, `376` = 15, `377` = 13.9, `378` = 13.3, `379` = 13.1, 
     `380` = 10.2, `381` = 10.4, `382` = 10.9, `383` = 11.3, `384` = 12.3, `385` = 8.8, 
     `386` = 7.2, `387` = 10.5, `388` = 7.4, `389` = 10.2, `390` = 11.5, `391` = 15.1, 
     `392` = 23.2, `393` = 9.7, `394` = 13.8, `395` = 12.7, `396` = 13.1, `397` = 12.5, 
     `398` = 8.5, `399` = 5, `400` = 6.3, `401` = 5.6, `402` = 7.2, `403` = 12.1, `404` = 8.3, 
     `405` = 8.5, `406` = 5, `407` = 11.9, `408` = 27.9, `409` = 17.2, `410` = 27.5, `411` = 15, 
     `412` = 17.2, `413` = 17.9, `414` = 16.3, `415` = 7, `416` = 7.2, `417` = 7.5, `418` = 10.4, 
     `419` = 8.8, `420` = 8.4, `421` = 16.7, `422` = 14.2, `423` = 20.8, `424` = 13.4, 
     `425` = 11.7, `426` = 8.3, `427` = 10.2, `428` = 10.9, `429` = 11, `430` = 9.5, `431` = 14.5, 
     `432` = 14.1, `433` = 16.1, `434` = 14.3, `435` = 11.7, `436` = 13.4, `437` = 9.6, 
     `438` = 8.7, `439` = 8.4, `440` = 12.8, `441` = 10.5, `442` = 17.1, `443` = 18.4, 
     `444` = 15.4, `445` = 10.8, `446` = 11.8, `447` = 14.9, `448` = 12.6, `449` = 14.1, 
     `450` = 13, `451` = 13.4, `452` = 15.2, `453` = 16.1, `454` = 17.8, `455` = 14.9, 
     `456` = 14.1, `457` = 12.7, `458` = 13.5, `459` = 14.9, `460` = 20, `461` = 16.4, 
     `462` = 17.7, `463` = 19.5, `464` = 20.2, `465` = 21.4, `466` = 19.9, `467` = 19, 
     `468` = 19.1, `469` = 19.1, `470` = 20.1, `471` = 19.9, `472` = 19.6, `473` = 23.2, 
     `474` = 29.8, `475` = 13.8, `476` = 13.3, `477` = 16.7, `478` = 12, `479` = 14.6, 
     `480` = 21.4, `481` = 23, `482` = 23.7, `483` = 25, `484` = 21.8, `485` = 20.6, `486` = 21.2, 
     `487` = 19.1, `488` = 20.6, `489` = 15.2, `490` = 7, `491` = 8.1, `492` = 13.6, `493` = 20.1, 
     `494` = 21.8, `495` = 24.5, `496` = 23.1, `497` = 19.7, `498` = 18.3, `499` = 21.2, 
     `500` = 17.5, `501` = 16.8, `502` = 22.4, `503` = 20.6, `504` = 23.9, `505` = 22, 
     `506` = 11.9), ordered = c(crim = FALSE, zn = FALSE, indus = FALSE, chas = FALSE, 
     nox = FALSE, rm = FALSE, age = FALSE, dis = FALSE, rad = FALSE, tax = FALSE, ptratio = FALSE, 
     b = FALSE, lstat = FALSE)), xlevels = list(chas = c("0", "1")), class = "rpart"), 
         task.desc = structure(list(id = "regrtask", type = "regr", target = "medv", size = 506L, 
             n.feat = c(numerics = 12L, factors = 1L, ordered = 0L, functionals = 0L), 
             has.missings = FALSE, has.weights = FALSE, has.blocking = FALSE, has.coordinates = FALSE), class = c("RegrTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), subset = 1:506, features = c("crim", "zn", 
         "indus", "chas", "nox", "rm", "age", "dis", "rad", "tax", "ptratio", "b", "lstat"
         ), factor.levels = list(chas = c("0", "1")), time = 0.00799999999998136, dump = NULL), class = "WrappedModel"), 
         data = structure(list(crim = c(0.00632, 0.02731, 0.02729, 0.03237, 0.06905, 0.02985, 
         0.08829, 0.14455, 0.21124, 0.17004, 0.22489, 0.11747, 0.09378, 0.62976, 0.63796, 
         0.62739, 1.05393, 0.7842, 0.80271, 0.7258, 1.25179, 0.85204, 1.23247, 0.98843, 
         0.75026, 0.84054, 0.67191, 0.95577, 0.77299, 1.00245, 1.13081, 1.35472, 1.38799, 
         1.15172, 1.61282, 0.06417, 0.09744, 0.08014, 0.17505, 0.02763, 0.03359, 0.12744, 
         0.1415, 0.15936, 0.12269, 0.17142, 0.18836, 0.22927, 0.25387, 0.21977, 0.08873, 
         0.04337, 0.0536, 0.04981, 0.0136, 0.01311, 0.02055, 0.01432, 0.15445, 0.10328, 
         0.14932, 0.17171, 0.11027, 0.1265, 0.01951, 0.03584, 0.04379, 0.05789, 0.13554, 
         0.12816, 0.08826, 0.15876, 0.09164, 0.19539, 0.07896, 0.09512, 0.10153, 0.08707, 
         0.05646, 0.08387, 0.04113, 0.04462, 0.03659, 0.03551, 0.05059, 0.05735, 0.05188, 
         0.07151, 0.0566, 0.05302, 0.04684, 0.03932, 0.04203, 0.02875, 0.04294, 0.12204, 
         0.11504, 0.12083, 0.08187, 0.0686, 0.14866, 0.11432, 0.22876, 0.21161, 0.1396, 
         0.13262, 0.1712, 0.13117, 0.12802, 0.26363, 0.10793, 0.10084, 0.12329, 0.22212, 
         0.14231, 0.17134, 0.13158, 0.15098, 0.13058, 0.14476, 0.06899, 0.07165, 0.09299, 
         0.15038, 0.09849, 0.16902, 0.38735, 0.25915, 0.32543, 0.88125, 0.34006, 1.19294, 
         0.59005, 0.32982, 0.97617, 0.55778, 0.32264, 0.35233, 0.2498, 0.54452, 0.2909, 
         1.62864, 3.32105, 4.0974, 2.77974, 2.37934, 2.15505, 2.36862, 2.33099, 2.73397, 
         1.6566, 1.49632, 1.12658, 2.14918, 1.41385, 3.53501, 2.44668, 1.22358, 1.34284, 
         1.42502, 1.27346, 1.46336, 1.83377, 1.51902, 2.24236, 2.924, 2.01019, 1.80028, 
         2.3004, 2.44953, 1.20742, 2.3139, 0.13914, 0.09178, 0.08447, 0.06664, 0.07022, 
         0.05425, 0.06642, 0.0578, 0.06588, 0.06888, 0.09103, 0.10008, 0.08308, 0.06047, 
         0.05602, 0.07875, 0.12579, 0.0837, 0.09068, 0.06911, 0.08664, 0.02187, 0.01439, 
         0.01381, 0.04011, 0.04666, 0.03768, 0.0315, 0.01778, 0.03445, 0.02177, 0.0351, 
         0.02009, 0.13642, 0.22969, 0.25199, 0.13587, 0.43571, 0.17446, 0.37578, 0.21719, 
         0.14052, 0.28955, 0.19802, 0.0456, 0.07013, 0.11069, 0.11425, 0.35809, 0.40771, 
         0.62356, 0.6147, 0.31533, 0.52693, 0.38214, 0.41238, 0.29819, 0.44178, 0.537, 
         0.46296, 0.57529, 0.33147, 0.44791, 0.33045, 0.52058, 0.51183, 0.08244, 0.09252, 
         0.11329, 0.10612, 0.1029, 0.12757, 0.20608, 0.19133, 0.33983, 0.19657, 0.16439, 
         0.19073, 0.1403, 0.21409, 0.08221, 0.36894, 0.04819, 0.03548, 0.01538, 0.61154, 
         0.66351, 0.65665, 0.54011, 0.53412, 0.52014, 0.82526, 0.55007, 0.76162, 0.7857, 
         0.57834, 0.5405, 0.09065, 0.29916, 0.16211, 0.1146, 0.22188, 0.05644, 0.09604, 
         0.10469, 0.06127, 0.07978, 0.21038, 0.03578, 0.03705, 0.06129, 0.01501, 0.00906, 
         0.01096, 0.01965, 0.03871, 0.0459, 0.04297, 0.03502, 0.07886, 0.03615, 0.08265, 
         0.08199, 0.12932, 0.05372, 0.14103, 0.06466, 0.05561, 0.04417, 0.03537, 0.09266, 
         0.1, 0.05515, 0.05479, 0.07503, 0.04932, 0.49298, 0.3494, 2.63548, 0.79041, 0.26169, 
         0.26938, 0.3692, 0.25356, 0.31827, 0.24522, 0.40202, 0.47547, 0.1676, 0.18159, 
         0.35114, 0.28392, 0.34109, 0.19186, 0.30347, 0.24103, 0.06617, 0.06724, 0.04544, 
         0.05023, 0.03466, 0.05083, 0.03738, 0.03961, 0.03427, 0.03041, 0.03306, 0.05497, 
         0.06151, 0.01301, 0.02498, 0.02543, 0.03049, 0.03113, 0.06162, 0.0187, 0.01501, 
         0.02899, 0.06211, 0.0795, 0.07244, 0.01709, 0.04301, 0.10659, 8.98296, 3.8497, 
         5.20177, 4.26131, 4.54192, 3.83684, 3.67822, 4.22239, 3.47428, 4.55587, 3.69695, 
         13.5222, 4.89822, 5.66998, 6.53876, 9.2323, 8.26725, 11.1081, 18.4982, 19.6091, 
         15.288, 9.82349, 23.6482, 17.8667, 88.9762, 15.8744, 9.18702, 7.99248, 20.0849, 
         16.8118, 24.3938, 22.5971, 14.3337, 8.15174, 6.96215, 5.29305, 11.5779, 8.64476, 
         13.3598, 8.71675, 5.87205, 7.67202, 38.3518, 9.91655, 25.0461, 14.2362, 9.59571, 
         24.8017, 41.5292, 67.9208, 20.7162, 11.9511, 7.40389, 14.4383, 51.1358, 14.0507, 
         18.811, 28.6558, 45.7461, 18.0846, 10.8342, 25.9406, 73.5341, 11.8123, 11.0874, 
         7.02259, 12.0482, 7.05042, 8.79212, 15.8603, 12.2472, 37.6619, 7.36711, 9.33889, 
         8.49213, 10.0623, 6.44405, 5.58107, 13.9134, 11.1604, 14.4208, 15.1772, 13.6781, 
         9.39063, 22.0511, 9.72418, 5.66637, 9.96654, 12.8023, 10.6718, 6.28807, 9.92485, 
         9.32909, 7.52601, 6.71772, 5.44114, 5.09017, 8.24809, 9.51363, 4.75237, 4.66883, 
         8.20058, 7.75223, 6.80117, 4.81213, 3.69311, 6.65492, 5.82115, 7.83932, 3.1636, 
         3.77498, 4.42228, 15.5757, 13.0751, 4.34879, 4.03841, 3.56868, 4.64689, 8.05579, 
         6.39312, 4.87141, 15.0234, 10.233, 14.3337, 5.82401, 5.70818, 5.73116, 2.81838, 
         2.37857, 3.67367, 5.69175, 4.83567, 0.15086, 0.18337, 0.20746, 0.10574, 0.11132, 
         0.17331, 0.27957, 0.17899, 0.2896, 0.26838, 0.23912, 0.17783, 0.22438, 0.06263, 
         0.04527, 0.06076, 0.10959, 0.04741), zn = c(18, 0, 0, 0, 0, 0, 12.5, 12.5, 12.5, 
         12.5, 12.5, 12.5, 12.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 75, 
         90, 85, 100, 25, 25, 25, 25, 25, 25, 17.5, 80, 80, 12.5, 12.5, 12.5, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 28, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 60, 60, 80, 80, 80, 
         80, 95, 95, 82.5, 82.5, 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 30, 30, 30, 
         22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 80, 80, 90, 20, 20, 20, 20, 20, 20, 20, 
         20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 20, 20, 20, 20, 90, 
         90, 55, 80, 52.5, 52.5, 52.5, 80, 80, 80, 0, 0, 0, 0, 0, 70, 70, 70, 34, 34, 
         34, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 35, 35, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 55, 55, 0, 0, 85, 80, 40, 
         40, 60, 60, 90, 80, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0), indus = c(2.31, 7.07, 7.07, 2.18, 2.18, 2.18, 7.87, 7.87, 7.87, 7.87, 
         7.87, 7.87, 7.87, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 
         8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 8.14, 5.96, 
         5.96, 5.96, 5.96, 2.95, 2.95, 6.91, 6.91, 6.91, 6.91, 6.91, 6.91, 6.91, 6.91, 
         6.91, 5.64, 5.64, 5.64, 5.64, 4, 1.22, 0.74, 1.32, 5.13, 5.13, 5.13, 5.13, 5.13, 
         5.13, 1.38, 3.37, 3.37, 6.07, 6.07, 6.07, 10.81, 10.81, 10.81, 10.81, 12.83, 
         12.83, 12.83, 12.83, 12.83, 12.83, 4.86, 4.86, 4.86, 4.86, 4.49, 4.49, 4.49, 
         4.49, 3.41, 3.41, 3.41, 3.41, 15.04, 15.04, 15.04, 2.89, 2.89, 2.89, 2.89, 2.89, 
         8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 8.56, 10.01, 10.01, 
         10.01, 10.01, 10.01, 10.01, 10.01, 10.01, 10.01, 25.65, 25.65, 25.65, 25.65, 
         25.65, 25.65, 25.65, 21.89, 21.89, 21.89, 21.89, 21.89, 21.89, 21.89, 21.89, 
         21.89, 21.89, 21.89, 21.89, 21.89, 21.89, 21.89, 19.58, 19.58, 19.58, 19.58, 
         19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 
         19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 19.58, 
         19.58, 19.58, 19.58, 19.58, 4.05, 4.05, 4.05, 4.05, 4.05, 4.05, 4.05, 2.46, 2.46, 
         2.46, 2.46, 2.46, 2.46, 2.46, 2.46, 3.44, 3.44, 3.44, 3.44, 3.44, 3.44, 2.93, 
         2.93, 0.46, 1.52, 1.52, 1.52, 1.47, 1.47, 2.03, 2.03, 2.68, 2.68, 10.59, 10.59, 
         10.59, 10.59, 10.59, 10.59, 10.59, 10.59, 10.59, 10.59, 10.59, 13.89, 13.89, 
         13.89, 13.89, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 6.2, 
         6.2, 6.2, 6.2, 6.2, 6.2, 4.93, 4.93, 4.93, 4.93, 4.93, 4.93, 5.86, 5.86, 5.86, 
         5.86, 5.86, 5.86, 5.86, 5.86, 5.86, 5.86, 3.64, 3.64, 3.75, 3.97, 3.97, 3.97, 
         3.97, 3.97, 3.97, 3.97, 3.97, 3.97, 3.97, 3.97, 3.97, 6.96, 6.96, 6.96, 6.96, 
         6.96, 6.41, 6.41, 6.41, 6.41, 6.41, 3.33, 3.33, 3.33, 3.33, 1.21, 2.97, 2.25, 
         1.76, 5.32, 5.32, 5.32, 4.95, 4.95, 4.95, 13.92, 13.92, 13.92, 13.92, 13.92, 
         2.24, 2.24, 2.24, 6.09, 6.09, 6.09, 2.18, 2.18, 2.18, 2.18, 9.9, 9.9, 9.9, 9.9, 
         9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 7.38, 7.38, 7.38, 7.38, 7.38, 7.38, 7.38, 
         7.38, 3.24, 3.24, 3.24, 6.06, 6.06, 5.19, 5.19, 5.19, 5.19, 5.19, 5.19, 5.19, 
         5.19, 1.52, 1.89, 3.78, 3.78, 4.39, 4.39, 4.15, 2.01, 1.25, 1.25, 1.69, 1.69, 
         2.02, 1.91, 1.91, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 18.1, 
         18.1, 18.1, 18.1, 18.1, 18.1, 27.74, 27.74, 27.74, 27.74, 27.74, 9.69, 9.69, 
         9.69, 9.69, 9.69, 9.69, 9.69, 9.69, 11.93, 11.93, 11.93, 11.93, 11.93), chas = structure(c(1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 
         1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 
         2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 
         1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 
         1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L), .Label = c("0", "1"), class = "factor"), nox = c(0.538, 
         0.469, 0.469, 0.458, 0.458, 0.458, 0.524, 0.524, 0.524, 0.524, 0.524, 0.524, 
         0.524, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 
         0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 0.538, 
         0.538, 0.499, 0.499, 0.499, 0.499, 0.428, 0.428, 0.448, 0.448, 0.448, 0.448, 
         0.448, 0.448, 0.448, 0.448, 0.448, 0.439, 0.439, 0.439, 0.439, 0.41, 0.403, 0.41, 
         0.411, 0.453, 0.453, 0.453, 0.453, 0.453, 0.453, 0.4161, 0.398, 0.398, 0.409, 
         0.409, 0.409, 0.413, 0.413, 0.413, 0.413, 0.437, 0.437, 0.437, 0.437, 0.437, 
         0.437, 0.426, 0.426, 0.426, 0.426, 0.449, 0.449, 0.449, 0.449, 0.489, 0.489, 
         0.489, 0.489, 0.464, 0.464, 0.464, 0.445, 0.445, 0.445, 0.445, 0.445, 0.52, 0.52, 
         0.52, 0.52, 0.52, 0.52, 0.52, 0.52, 0.52, 0.52, 0.52, 0.547, 0.547, 0.547, 0.547, 
         0.547, 0.547, 0.547, 0.547, 0.547, 0.581, 0.581, 0.581, 0.581, 0.581, 0.581, 
         0.581, 0.624, 0.624, 0.624, 0.624, 0.624, 0.624, 0.624, 0.624, 0.624, 0.624, 
         0.624, 0.624, 0.624, 0.624, 0.624, 0.871, 0.871, 0.871, 0.871, 0.871, 0.871, 
         0.871, 0.871, 0.871, 0.871, 0.871, 0.871, 0.871, 0.871, 0.871, 0.605, 0.605, 
         0.871, 0.605, 0.605, 0.605, 0.605, 0.605, 0.605, 0.605, 0.605, 0.605, 0.605, 
         0.605, 0.605, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.488, 0.488, 0.488, 
         0.488, 0.488, 0.488, 0.488, 0.488, 0.437, 0.437, 0.437, 0.437, 0.437, 0.437, 
         0.401, 0.401, 0.422, 0.404, 0.404, 0.404, 0.403, 0.403, 0.415, 0.415, 0.4161, 
         0.4161, 0.489, 0.489, 0.489, 0.489, 0.489, 0.489, 0.489, 0.489, 0.489, 0.489, 
         0.489, 0.55, 0.55, 0.55, 0.55, 0.507, 0.507, 0.507, 0.507, 0.504, 0.504, 0.504, 
         0.504, 0.504, 0.504, 0.504, 0.504, 0.507, 0.507, 0.507, 0.507, 0.507, 0.507, 
         0.428, 0.428, 0.428, 0.428, 0.428, 0.428, 0.431, 0.431, 0.431, 0.431, 0.431, 
         0.431, 0.431, 0.431, 0.431, 0.431, 0.392, 0.392, 0.394, 0.647, 0.647, 0.647, 
         0.647, 0.647, 0.647, 0.647, 0.647, 0.647, 0.647, 0.575, 0.575, 0.464, 0.464, 
         0.464, 0.464, 0.464, 0.447, 0.447, 0.447, 0.447, 0.447, 0.4429, 0.4429, 0.4429, 
         0.4429, 0.401, 0.4, 0.389, 0.385, 0.405, 0.405, 0.405, 0.411, 0.411, 0.411, 0.437, 
         0.437, 0.437, 0.437, 0.437, 0.4, 0.4, 0.4, 0.433, 0.433, 0.433, 0.472, 0.472, 
         0.472, 0.472, 0.544, 0.544, 0.544, 0.544, 0.544, 0.544, 0.544, 0.544, 0.544, 
         0.544, 0.544, 0.544, 0.493, 0.493, 0.493, 0.493, 0.493, 0.493, 0.493, 0.493, 
         0.46, 0.46, 0.46, 0.4379, 0.4379, 0.515, 0.515, 0.515, 0.515, 0.515, 0.515, 0.515, 
         0.515, 0.442, 0.518, 0.484, 0.484, 0.442, 0.442, 0.429, 0.435, 0.429, 0.429, 
         0.411, 0.411, 0.41, 0.413, 0.413, 0.77, 0.77, 0.77, 0.77, 0.77, 0.77, 0.77, 0.77, 
         0.718, 0.718, 0.718, 0.631, 0.631, 0.631, 0.631, 0.631, 0.668, 0.668, 0.668, 
         0.671, 0.671, 0.671, 0.671, 0.671, 0.671, 0.671, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 
         0.7, 0.7, 0.7, 0.7, 0.7, 0.693, 0.693, 0.693, 0.693, 0.693, 0.693, 0.693, 0.693, 
         0.693, 0.693, 0.693, 0.693, 0.693, 0.659, 0.659, 0.597, 0.597, 0.597, 0.597, 
         0.597, 0.597, 0.693, 0.679, 0.679, 0.679, 0.679, 0.718, 0.718, 0.718, 0.614, 
         0.614, 0.584, 0.679, 0.584, 0.679, 0.679, 0.679, 0.584, 0.584, 0.584, 0.713, 
         0.713, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 
         0.74, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 0.713, 
         0.713, 0.713, 0.713, 0.713, 0.713, 0.655, 0.655, 0.655, 0.584, 0.58, 0.58, 0.58, 
         0.532, 0.58, 0.614, 0.584, 0.584, 0.614, 0.614, 0.614, 0.614, 0.532, 0.532, 0.532, 
         0.532, 0.583, 0.583, 0.583, 0.583, 0.609, 0.609, 0.609, 0.609, 0.609, 0.585, 
         0.585, 0.585, 0.585, 0.585, 0.585, 0.585, 0.585, 0.573, 0.573, 0.573, 0.573, 
         0.573), rm = c(6.575, 6.421, 7.185, 6.998, 7.147, 6.43, 6.012, 6.172, 5.631, 
         6.004, 6.377, 6.009, 5.889, 5.949, 6.096, 5.834, 5.935, 5.99, 5.456, 5.727, 5.57, 
         5.965, 6.142, 5.813, 5.924, 5.599, 5.813, 6.047, 6.495, 6.674, 5.713, 6.072, 
         5.95, 5.701, 6.096, 5.933, 5.841, 5.85, 5.966, 6.595, 7.024, 6.77, 6.169, 6.211, 
         6.069, 5.682, 5.786, 6.03, 5.399, 5.602, 5.963, 6.115, 6.511, 5.998, 5.888, 7.249, 
         6.383, 6.816, 6.145, 5.927, 5.741, 5.966, 6.456, 6.762, 7.104, 6.29, 5.787, 5.878, 
         5.594, 5.885, 6.417, 5.961, 6.065, 6.245, 6.273, 6.286, 6.279, 6.14, 6.232, 5.874, 
         6.727, 6.619, 6.302, 6.167, 6.389, 6.63, 6.015, 6.121, 7.007, 7.079, 6.417, 6.405, 
         6.442, 6.211, 6.249, 6.625, 6.163, 8.069, 7.82, 7.416, 6.727, 6.781, 6.405, 6.137, 
         6.167, 5.851, 5.836, 6.127, 6.474, 6.229, 6.195, 6.715, 5.913, 6.092, 6.254, 
         5.928, 6.176, 6.021, 5.872, 5.731, 5.87, 6.004, 5.961, 5.856, 5.879, 5.986, 5.613, 
         5.693, 6.431, 5.637, 6.458, 6.326, 6.372, 5.822, 5.757, 6.335, 5.942, 6.454, 
         5.857, 6.151, 6.174, 5.019, 5.403, 5.468, 4.903, 6.13, 5.628, 4.926, 5.186, 5.597, 
         6.122, 5.404, 5.012, 5.709, 6.129, 6.152, 5.272, 6.943, 6.066, 6.51, 6.25, 7.489, 
         7.802, 8.375, 5.854, 6.101, 7.929, 5.877, 6.319, 6.402, 5.875, 5.88, 5.572, 6.416, 
         5.859, 6.546, 6.02, 6.315, 6.86, 6.98, 7.765, 6.144, 7.155, 6.563, 5.604, 6.153, 
         7.831, 6.782, 6.556, 7.185, 6.951, 6.739, 7.178, 6.8, 6.604, 7.875, 7.287, 7.107, 
         7.274, 6.975, 7.135, 6.162, 7.61, 7.853, 8.034, 5.891, 6.326, 5.783, 6.064, 5.344, 
         5.96, 5.404, 5.807, 6.375, 5.412, 6.182, 5.888, 6.642, 5.951, 6.373, 6.951, 6.164, 
         6.879, 6.618, 8.266, 8.725, 8.04, 7.163, 7.686, 6.552, 5.981, 7.412, 8.337, 8.247, 
         6.726, 6.086, 6.631, 7.358, 6.481, 6.606, 6.897, 6.095, 6.358, 6.393, 5.593, 
         5.605, 6.108, 6.226, 6.433, 6.718, 6.487, 6.438, 6.957, 8.259, 6.108, 5.876, 
         7.454, 8.704, 7.333, 6.842, 7.203, 7.52, 8.398, 7.327, 7.206, 5.56, 7.014, 8.297, 
         7.47, 5.92, 5.856, 6.24, 6.538, 7.691, 6.758, 6.854, 7.267, 6.826, 6.482, 6.812, 
         7.82, 6.968, 7.645, 7.923, 7.088, 6.453, 6.23, 6.209, 6.315, 6.565, 6.861, 7.148, 
         6.63, 6.127, 6.009, 6.678, 6.549, 5.79, 6.345, 7.041, 6.871, 6.59, 6.495, 6.982, 
         7.236, 6.616, 7.42, 6.849, 6.635, 5.972, 4.973, 6.122, 6.023, 6.266, 6.567, 5.705, 
         5.914, 5.782, 6.382, 6.113, 6.426, 6.376, 6.041, 5.708, 6.415, 6.431, 6.312, 
         6.083, 5.868, 6.333, 6.144, 5.706, 6.031, 6.316, 6.31, 6.037, 5.869, 5.895, 6.059, 
         5.985, 5.968, 7.241, 6.54, 6.696, 6.874, 6.014, 5.898, 6.516, 6.635, 6.939, 6.49, 
         6.579, 5.884, 6.728, 5.663, 5.936, 6.212, 6.395, 6.127, 6.112, 6.398, 6.251, 
         5.362, 5.803, 8.78, 3.561, 4.963, 3.863, 4.97, 6.683, 7.016, 6.216, 5.875, 4.906, 
         4.138, 7.313, 6.649, 6.794, 6.38, 6.223, 6.968, 6.545, 5.536, 5.52, 4.368, 5.277, 
         4.652, 5, 4.88, 5.39, 5.713, 6.051, 5.036, 6.193, 5.887, 6.471, 6.405, 5.747, 
         5.453, 5.852, 5.987, 6.343, 6.404, 5.349, 5.531, 5.683, 4.138, 5.608, 5.617, 
         6.852, 5.757, 6.657, 4.628, 5.155, 4.519, 6.434, 6.782, 5.304, 5.957, 6.824, 
         6.411, 6.006, 5.648, 6.103, 5.565, 5.896, 5.837, 6.202, 6.193, 6.38, 6.348, 6.833, 
         6.425, 6.436, 6.208, 6.629, 6.461, 6.152, 5.935, 5.627, 5.818, 6.406, 6.219, 
         6.485, 5.854, 6.459, 6.341, 6.251, 6.185, 6.417, 6.749, 6.655, 6.297, 7.393, 
         6.728, 6.525, 5.976, 5.936, 6.301, 6.081, 6.701, 6.376, 6.317, 6.513, 6.209, 
         5.759, 5.952, 6.003, 5.926, 5.713, 6.167, 6.229, 6.437, 6.98, 5.427, 6.162, 6.484, 
         5.304, 6.185, 6.229, 6.242, 6.75, 7.061, 5.762, 5.871, 6.312, 6.114, 5.905, 5.454, 
         5.414, 5.093, 5.983, 5.983, 5.707, 5.926, 5.67, 5.39, 5.794, 6.019, 5.569, 6.027, 
         6.593, 6.12, 6.976, 6.794, 6.03), age = c(65.2, 78.9, 61.1, 45.8, 54.2, 58.7, 
         66.6, 96.1, 100, 85.9, 94.3, 82.9, 39, 61.8, 84.5, 56.5, 29.3, 81.7, 36.6, 69.5, 
         98.1, 89.2, 91.7, 100, 94.1, 85.7, 90.3, 88.8, 94.4, 87.3, 94.1, 100, 82, 95, 
         96.9, 68.2, 61.4, 41.5, 30.2, 21.8, 15.8, 2.9, 6.6, 6.5, 40, 33.8, 33.3, 85.5, 
         95.3, 62, 45.7, 63, 21.1, 21.4, 47.6, 21.9, 35.7, 40.5, 29.2, 47.2, 66.2, 93.4, 
         67.8, 43.4, 59.5, 17.8, 31.1, 21.4, 36.8, 33, 6.6, 17.5, 7.8, 6.2, 6, 45, 74.5, 
         45.8, 53.7, 36.6, 33.5, 70.4, 32.2, 46.7, 48, 56.1, 45.1, 56.8, 86.3, 63.1, 66.1, 
         73.9, 53.6, 28.9, 77.3, 57.8, 69.6, 76, 36.9, 62.5, 79.9, 71.3, 85.4, 87.4, 90, 
         96.7, 91.9, 85.2, 97.1, 91.2, 54.4, 81.6, 92.9, 95.4, 84.2, 88.2, 72.5, 82.6, 
         73.1, 65.2, 69.7, 84.1, 92.9, 97, 95.8, 88.4, 95.6, 96, 98.8, 94.7, 98.9, 97.7, 
         97.9, 95.4, 98.4, 98.2, 93.5, 98.4, 98.2, 97.9, 93.6, 100, 100, 100, 97.8, 100, 
         100, 95.7, 93.8, 94.9, 97.3, 100, 88, 98.5, 96, 82.6, 94, 97.4, 100, 100, 92.6, 
         90.8, 98.2, 93.9, 91.8, 93, 96.2, 79.2, 96.1, 95.2, 94.6, 97.3, 88.5, 84.1, 68.7, 
         33.1, 47.2, 73.4, 74.4, 58.4, 83.3, 62.2, 92.2, 95.6, 89.8, 68.8, 53.6, 41.1, 
         29.1, 38.9, 21.5, 30.8, 26.3, 9.9, 18.8, 32, 34.1, 36.6, 38.3, 15.3, 13.9, 38.4, 
         15.7, 33.2, 31.9, 22.3, 52.5, 72.7, 59.1, 100, 92.1, 88.6, 53.8, 32.3, 9.8, 42.4, 
         56, 85.1, 93.8, 92.4, 88.5, 91.3, 77.7, 80.8, 78.3, 83, 86.5, 79.9, 17, 21.4, 
         68.1, 76.9, 73.3, 70.4, 66.5, 61.5, 76.5, 71.6, 18.5, 42.2, 54.3, 65.1, 52.9, 
         7.8, 76.5, 70.2, 34.9, 79.2, 49.1, 17.5, 13, 8.9, 6.8, 8.4, 32, 19.1, 34.2, 86.9, 
         100, 100, 81.8, 89.4, 91.5, 94.5, 91.6, 62.8, 84.6, 67, 52.6, 61.5, 42.1, 16.3, 
         58.7, 51.8, 32.9, 42.8, 49, 27.6, 32.1, 32.2, 64.5, 37.2, 49.7, 24.8, 20.8, 31.9, 
         31.5, 31.3, 45.6, 22.9, 27.9, 27.7, 23.4, 18.4, 42.3, 31.1, 51, 58, 20.1, 10, 
         47.4, 40.4, 18.4, 17.7, 41.1, 58.1, 71.9, 70.3, 82.5, 76.7, 37.8, 52.8, 90.4, 
         82.8, 87.3, 77.7, 83.2, 71.7, 67.2, 58.8, 52.3, 54.3, 49.9, 74.3, 40.1, 14.7, 
         28.9, 43.7, 25.8, 17.2, 32.2, 28.4, 23.3, 38.1, 38.5, 34.5, 46.3, 59.6, 37.3, 
         45.4, 58.5, 49.3, 59.7, 56.4, 28.1, 48.5, 52.3, 27.7, 29.7, 34.5, 44.4, 35.9, 
         18.5, 36.1, 21.9, 19.5, 97.4, 91, 83.4, 81.3, 88, 91.1, 96.2, 89, 82.9, 87.9, 
         91.4, 100, 100, 96.8, 97.5, 100, 89.6, 100, 100, 97.9, 93.3, 98.8, 96.2, 100, 
         91.9, 99.1, 100, 100, 91.2, 98.1, 100, 89.5, 100, 98.9, 97, 82.5, 97, 92.6, 94.7, 
         98.8, 96, 98.9, 100, 77.8, 100, 100, 100, 96, 85.4, 100, 100, 100, 97.9, 100, 
         100, 100, 100, 100, 100, 100, 90.8, 89.1, 100, 76.5, 100, 95.3, 87.6, 85.1, 70.6, 
         95.4, 59.7, 78.7, 78.1, 95.6, 86.1, 94.3, 74.8, 87.9, 95, 94.6, 93.3, 100, 87.9, 
         93.9, 92.4, 97.2, 100, 100, 96.6, 94.8, 96.4, 96.6, 98.7, 98.3, 92.6, 98.2, 91.8, 
         99.3, 94.1, 86.5, 87.9, 80.3, 83.7, 84.4, 90, 88.4, 83, 89.9, 65.4, 48.2, 84.7, 
         94.5, 71, 56.7, 84, 90.7, 75, 67.6, 95.4, 97.4, 93.6, 97.3, 96.7, 88, 64.7, 74.9, 
         77, 40.3, 41.9, 51.9, 79.8, 53.2, 92.7, 98.3, 98, 98.8, 83.5, 54, 42.6, 28.8, 
         72.9, 70.6, 65.3, 73.5, 79.7, 69.1, 76.7, 91, 89.3, 80.8), dis = c(4.09, 4.9671, 
         4.9671, 6.0622, 6.0622, 6.0622, 5.5605, 5.9505, 6.0821, 6.5921, 6.3467, 6.2267, 
         5.4509, 4.7075, 4.4619, 4.4986, 4.4986, 4.2579, 3.7965, 3.7965, 3.7979, 4.0123, 
         3.9769, 4.0952, 4.3996, 4.4546, 4.682, 4.4534, 4.4547, 4.239, 4.233, 4.175, 3.99, 
         3.7872, 3.7598, 3.3603, 3.3779, 3.9342, 3.8473, 5.4011, 5.4011, 5.7209, 5.7209, 
         5.7209, 5.7209, 5.1004, 5.1004, 5.6894, 5.87, 6.0877, 6.8147, 6.8147, 6.8147, 
         6.8147, 7.3197, 8.6966, 9.1876, 8.3248, 7.8148, 6.932, 7.2254, 6.8185, 7.2255, 
         7.9809, 9.2229, 6.6115, 6.6115, 6.498, 6.498, 6.498, 5.2873, 5.2873, 5.2873, 
         5.2873, 4.2515, 4.5026, 4.0522, 4.0905, 5.0141, 4.5026, 5.4007, 5.4007, 5.4007, 
         5.4007, 4.7794, 4.4377, 4.4272, 3.7476, 3.4217, 3.4145, 3.0923, 3.0921, 3.6659, 
         3.6659, 3.615, 3.4952, 3.4952, 3.4952, 3.4952, 3.4952, 2.7778, 2.8561, 2.7147, 
         2.7147, 2.421, 2.1069, 2.211, 2.1224, 2.4329, 2.5451, 2.7778, 2.6775, 2.3534, 
         2.548, 2.2565, 2.4631, 2.7301, 2.7474, 2.4775, 2.7592, 2.2577, 2.1974, 2.0869, 
         1.9444, 2.0063, 1.9929, 1.7572, 1.7883, 1.8125, 1.9799, 2.1185, 2.271, 2.3274, 
         2.4699, 2.346, 2.1107, 1.9669, 1.8498, 1.6686, 1.6687, 1.6119, 1.4394, 1.3216, 
         1.4118, 1.3459, 1.4191, 1.5166, 1.4608, 1.5296, 1.5257, 1.618, 1.5916, 1.6102, 
         1.6232, 1.7494, 1.7455, 1.7364, 1.8773, 1.7573, 1.7659, 1.7984, 1.9709, 2.0407, 
         2.162, 2.422, 2.2834, 2.0459, 2.4259, 2.1, 2.2625, 2.4259, 2.3887, 2.5961, 2.6463, 
         2.7019, 3.1323, 3.5549, 3.3175, 2.9153, 2.829, 2.741, 2.5979, 2.7006, 2.847, 
         2.9879, 3.2797, 3.1992, 3.7886, 4.5667, 4.5667, 6.4798, 6.4798, 6.4798, 6.2196, 
         6.2196, 5.6484, 7.309, 7.309, 7.309, 7.6534, 7.6534, 6.27, 6.27, 5.118, 5.118, 
         3.9454, 4.3549, 4.3549, 4.2392, 3.875, 3.8771, 3.665, 3.6526, 3.9454, 3.5875, 
         3.9454, 3.1121, 3.4211, 2.8893, 3.3633, 2.8617, 3.048, 3.2721, 3.2721, 2.8944, 
         2.8944, 3.2157, 3.2157, 3.3751, 3.3751, 3.6715, 3.6715, 3.8384, 3.6519, 3.6519, 
         3.6519, 4.148, 4.148, 6.1899, 6.1899, 6.3361, 6.3361, 7.0355, 7.0355, 7.9549, 
         7.9549, 8.0555, 8.0555, 7.8265, 7.8265, 7.3967, 7.3967, 8.9067, 8.9067, 9.2203, 
         9.2203, 6.3361, 1.801, 1.8946, 2.0107, 2.1121, 2.1398, 2.2885, 2.0788, 1.9301, 
         1.9865, 2.1329, 2.4216, 2.872, 3.9175, 4.429, 4.429, 3.9175, 4.3665, 4.0776, 
         4.2673, 4.7872, 4.8628, 4.1403, 4.1007, 4.6947, 5.2447, 5.2119, 5.885, 7.3073, 
         7.3073, 9.0892, 7.3172, 7.3172, 7.3172, 5.1167, 5.1167, 5.1167, 5.5027, 5.5027, 
         5.9604, 5.9604, 6.32, 7.8278, 7.8278, 7.8278, 5.4917, 5.4917, 5.4917, 4.022, 
         3.37, 3.0992, 3.1827, 3.3175, 3.1025, 2.5194, 2.6403, 2.834, 3.2628, 3.6023, 
         3.945, 3.9986, 4.0317, 3.5325, 4.0019, 4.5404, 4.5404, 4.7211, 4.7211, 4.7211, 
         5.4159, 5.4159, 5.4159, 5.2146, 5.2146, 5.8736, 6.6407, 6.6407, 6.4584, 6.4584, 
         5.9853, 5.2311, 5.615, 4.8122, 4.8122, 4.8122, 7.0379, 6.2669, 5.7321, 6.4654, 
         8.0136, 8.0136, 8.5353, 8.344, 8.7921, 8.7921, 10.7103, 10.7103, 12.1265, 10.5857, 
         10.5857, 2.1222, 2.5052, 2.7227, 2.5091, 2.5182, 2.2955, 2.1036, 1.9047, 1.9047, 
         1.6132, 1.7523, 1.5106, 1.3325, 1.3567, 1.2024, 1.1691, 1.1296, 1.1742, 1.137, 
         1.3163, 1.3449, 1.358, 1.3861, 1.3861, 1.4165, 1.5192, 1.5804, 1.5331, 1.4395, 
         1.4261, 1.4672, 1.5184, 1.5895, 1.7281, 1.9265, 2.1678, 1.77, 1.7912, 1.7821, 
         1.7257, 1.6768, 1.6334, 1.4896, 1.5004, 1.5888, 1.5741, 1.639, 1.7028, 1.6074, 
         1.4254, 1.1781, 1.2852, 1.4547, 1.4655, 1.413, 1.5275, 1.5539, 1.5894, 1.6582, 
         1.8347, 1.8195, 1.6475, 1.8026, 1.794, 1.8589, 1.8746, 1.9512, 2.0218, 2.0635, 
         1.9096, 1.9976, 1.8629, 1.9356, 1.9682, 2.0527, 2.0882, 2.2004, 2.3158, 2.2222, 
         2.1247, 2.0026, 1.9142, 1.8206, 1.8172, 1.8662, 2.0651, 2.0048, 1.9784, 1.8956, 
         1.9879, 2.072, 2.198, 2.2616, 2.185, 2.3236, 2.3552, 2.3682, 2.4527, 2.4961, 
         2.4358, 2.5806, 2.7792, 2.7831, 2.7175, 2.5975, 2.5671, 2.7344, 2.8016, 2.9634, 
         3.0665, 2.8715, 2.5403, 2.9084, 2.8237, 3.0334, 3.0993, 2.8965, 2.5329, 2.4298, 
         2.206, 2.3053, 2.1007, 2.1705, 1.9512, 3.4242, 3.3317, 3.4106, 4.0983, 3.724, 
         3.9917, 3.5459, 3.1523, 1.8209, 1.7554, 1.8226, 1.8681, 2.1099, 2.3817, 2.3817, 
         2.7986, 2.7986, 2.8927, 2.4091, 2.3999, 2.4982, 2.4786, 2.2875, 2.1675, 2.3889, 
         2.505), rad = c(1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 
         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 
         3, 3, 3, 4, 4, 4, 4, 3, 5, 2, 5, 8, 8, 8, 8, 8, 8, 3, 4, 4, 4, 4, 4, 4, 4, 4, 
         4, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 
         2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 
         2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
         5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
         5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 1, 1, 4, 2, 2, 2, 3, 3, 2, 2, 
         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 
         8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 
         1, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 
         5, 5, 1, 1, 1, 1, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 
         7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 1, 1, 
         5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 5, 5, 3, 3, 4, 4, 1, 1, 4, 4, 5, 4, 4, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 
         24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 
         1, 1, 1, 1, 1), tax = c(296, 242, 242, 222, 222, 222, 311, 311, 311, 311, 311, 
         311, 311, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 
         307, 307, 307, 307, 307, 307, 307, 307, 279, 279, 279, 279, 252, 252, 233, 233, 
         233, 233, 233, 233, 233, 233, 233, 243, 243, 243, 243, 469, 226, 313, 256, 284, 
         284, 284, 284, 284, 284, 216, 337, 337, 345, 345, 345, 305, 305, 305, 305, 398, 
         398, 398, 398, 398, 398, 281, 281, 281, 281, 247, 247, 247, 247, 270, 270, 270, 
         270, 270, 270, 270, 276, 276, 276, 276, 276, 384, 384, 384, 384, 384, 384, 384, 
         384, 384, 384, 384, 432, 432, 432, 432, 432, 432, 432, 432, 432, 188, 188, 188, 
         188, 188, 188, 188, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 
         437, 437, 437, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 
         403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 
         403, 296, 296, 296, 296, 296, 296, 296, 193, 193, 193, 193, 193, 193, 193, 193, 
         398, 398, 398, 398, 398, 398, 265, 265, 255, 329, 329, 329, 402, 402, 348, 348, 
         224, 224, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 276, 276, 276, 
         276, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 
         307, 307, 307, 300, 300, 300, 300, 300, 300, 330, 330, 330, 330, 330, 330, 330, 
         330, 330, 330, 315, 315, 244, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 
         264, 264, 223, 223, 223, 223, 223, 254, 254, 254, 254, 254, 216, 216, 216, 216, 
         198, 285, 300, 241, 293, 293, 293, 245, 245, 245, 289, 289, 289, 289, 289, 358, 
         358, 358, 329, 329, 329, 222, 222, 222, 222, 304, 304, 304, 304, 304, 304, 304, 
         304, 304, 304, 304, 304, 287, 287, 287, 287, 287, 287, 287, 287, 430, 430, 430, 
         304, 304, 224, 224, 224, 224, 224, 224, 224, 224, 284, 422, 370, 370, 352, 352, 
         351, 280, 335, 335, 411, 411, 187, 334, 334, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 
         666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 711, 711, 711, 
         711, 711, 391, 391, 391, 391, 391, 391, 391, 391, 273, 273, 273, 273, 273), ptratio = c(15.3, 
         17.8, 17.8, 18.7, 18.7, 18.7, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 21, 21, 
         21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 
         19.2, 19.2, 19.2, 19.2, 18.3, 18.3, 17.9, 17.9, 17.9, 17.9, 17.9, 17.9, 17.9, 
         17.9, 17.9, 16.8, 16.8, 16.8, 16.8, 21.1, 17.9, 17.3, 15.1, 19.7, 19.7, 19.7, 
         19.7, 19.7, 19.7, 18.6, 16.1, 16.1, 18.9, 18.9, 18.9, 19.2, 19.2, 19.2, 19.2, 
         18.7, 18.7, 18.7, 18.7, 18.7, 18.7, 19, 19, 19, 19, 18.5, 18.5, 18.5, 18.5, 17.8, 
         17.8, 17.8, 17.8, 18.2, 18.2, 18.2, 18, 18, 18, 18, 18, 20.9, 20.9, 20.9, 20.9, 
         20.9, 20.9, 20.9, 20.9, 20.9, 20.9, 20.9, 17.8, 17.8, 17.8, 17.8, 17.8, 17.8, 
         17.8, 17.8, 17.8, 19.1, 19.1, 19.1, 19.1, 19.1, 19.1, 19.1, 21.2, 21.2, 21.2, 
         21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 21.2, 14.7, 
         14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 
         14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 14.7, 
         14.7, 14.7, 14.7, 16.6, 16.6, 16.6, 16.6, 16.6, 16.6, 16.6, 17.8, 17.8, 17.8, 
         17.8, 17.8, 17.8, 17.8, 17.8, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.6, 15.6, 
         14.4, 12.6, 12.6, 12.6, 17, 17, 14.7, 14.7, 14.7, 14.7, 18.6, 18.6, 18.6, 18.6, 
         18.6, 18.6, 18.6, 18.6, 18.6, 18.6, 18.6, 16.4, 16.4, 16.4, 16.4, 17.4, 17.4, 
         17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 17.4, 
         17.4, 17.4, 17.4, 16.6, 16.6, 16.6, 16.6, 16.6, 16.6, 19.1, 19.1, 19.1, 19.1, 
         19.1, 19.1, 19.1, 19.1, 19.1, 19.1, 16.4, 16.4, 15.9, 13, 13, 13, 13, 13, 13, 
         13, 13, 13, 13, 13, 13, 18.6, 18.6, 18.6, 18.6, 18.6, 17.6, 17.6, 17.6, 17.6, 
         17.6, 14.9, 14.9, 14.9, 14.9, 13.6, 15.3, 15.3, 18.2, 16.6, 16.6, 16.6, 19.2, 
         19.2, 19.2, 16, 16, 16, 16, 16, 14.8, 14.8, 14.8, 16.1, 16.1, 16.1, 18.4, 18.4, 
         18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 
         18.4, 19.6, 19.6, 19.6, 19.6, 19.6, 19.6, 19.6, 19.6, 16.9, 16.9, 16.9, 16.9, 
         16.9, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 15.5, 15.9, 17.6, 17.6, 
         18.8, 18.8, 17.9, 17, 19.7, 19.7, 18.3, 18.3, 17, 22, 22, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 
         20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.2, 20.1, 20.1, 
         20.1, 20.1, 20.1, 19.2, 19.2, 19.2, 19.2, 19.2, 19.2, 19.2, 19.2, 21, 21, 21, 
         21, 21), b = c(396.9, 396.9, 392.83, 394.63, 396.9, 394.12, 395.6, 396.9, 386.63, 
         386.71, 392.52, 396.9, 390.5, 396.9, 380.02, 395.62, 386.85, 386.75, 288.99, 
         390.95, 376.57, 392.53, 396.9, 394.54, 394.33, 303.42, 376.88, 306.38, 387.94, 
         380.23, 360.17, 376.73, 232.6, 358.77, 248.31, 396.9, 377.56, 396.9, 393.43, 
         395.63, 395.62, 385.41, 383.37, 394.46, 389.39, 396.9, 396.9, 392.74, 396.9, 
         396.9, 395.56, 393.97, 396.9, 396.9, 396.9, 395.93, 396.9, 392.9, 390.68, 396.9, 
         395.11, 378.08, 396.9, 395.58, 393.24, 396.9, 396.9, 396.21, 396.9, 396.9, 383.73, 
         376.94, 390.91, 377.17, 394.92, 383.23, 373.66, 386.96, 386.4, 396.06, 396.9, 
         395.63, 396.9, 390.64, 396.9, 392.3, 395.99, 395.15, 396.9, 396.06, 392.18, 393.55, 
         395.01, 396.33, 396.9, 357.98, 391.83, 396.9, 393.53, 396.9, 394.76, 395.58, 
         70.8, 394.47, 392.69, 394.05, 395.67, 387.69, 395.24, 391.23, 393.49, 395.59, 
         394.95, 396.9, 388.74, 344.91, 393.3, 394.51, 338.63, 391.5, 389.15, 377.67, 
         378.09, 370.31, 379.38, 385.02, 359.29, 392.11, 396.9, 396.9, 395.04, 396.9, 
         385.76, 388.69, 262.76, 394.67, 378.25, 394.08, 392.04, 396.9, 388.08, 396.9, 
         396.9, 396.9, 396.9, 172.91, 169.27, 391.71, 356.99, 351.85, 372.8, 341.6, 343.28, 
         261.95, 321.02, 88.01, 88.63, 363.43, 353.89, 364.31, 338.92, 374.43, 389.61, 
         388.45, 395.11, 240.16, 369.3, 227.61, 297.09, 330.04, 292.29, 348.13, 396.9, 
         395.5, 393.23, 390.96, 393.23, 395.6, 391.27, 396.9, 395.56, 396.9, 394.12, 396.9, 
         391, 387.11, 392.63, 393.87, 382.84, 396.9, 377.68, 389.71, 390.49, 393.37, 376.7, 
         394.23, 396.9, 354.31, 392.2, 396.9, 384.3, 393.77, 395.38, 392.78, 390.55, 396.9, 
         394.87, 389.43, 381.32, 396.9, 393.25, 395.24, 390.94, 385.81, 348.93, 393.63, 
         392.8, 392.78, 396.9, 393.74, 391.7, 395.24, 390.39, 396.9, 385.05, 382, 387.38, 
         372.08, 377.51, 380.34, 378.35, 376.14, 385.91, 378.95, 360.2, 376.75, 388.45, 
         390.07, 379.41, 383.78, 391.25, 394.62, 372.75, 374.71, 372.49, 389.13, 390.18, 
         376.14, 374.71, 393.74, 396.28, 377.07, 386.09, 396.9, 392.89, 395.18, 386.34, 
         389.7, 383.29, 391.93, 392.8, 388.37, 386.86, 393.42, 387.89, 392.4, 384.07, 
         384.54, 390.3, 391.34, 388.65, 396.9, 394.96, 390.77, 396.9, 396.9, 389.25, 393.45, 
         396.9, 396.9, 387.31, 392.23, 377.07, 395.52, 394.72, 394.72, 341.6, 396.9, 396.9, 
         371.72, 396.9, 396.9, 396.9, 396.9, 396.9, 396.9, 392.85, 396.9, 368.24, 371.58, 
         390.86, 395.75, 383.61, 390.43, 393.68, 393.36, 396.9, 396.9, 396.9, 396.24, 
         350.45, 396.9, 396.3, 393.39, 395.69, 396.42, 390.7, 396.9, 395.21, 396.23, 396.9, 
         396.9, 396.9, 391.13, 396.9, 393.68, 396.9, 396.9, 382.44, 375.21, 368.57, 394.02, 
         362.25, 389.71, 389.4, 396.9, 396.9, 394.81, 396.14, 396.9, 396.9, 394.74, 389.96, 
         396.9, 387.97, 385.64, 364.61, 392.43, 390.94, 389.85, 396.9, 370.78, 392.33, 
         384.46, 382.8, 376.04, 377.73, 391.34, 395.43, 390.74, 374.56, 350.65, 380.79, 
         353.04, 354.55, 354.7, 316.03, 131.42, 375.52, 375.33, 392.05, 366.15, 347.88, 
         396.9, 396.9, 396.9, 363.02, 396.9, 396.9, 393.74, 396.9, 396.9, 396.9, 396.9, 
         285.83, 396.9, 396.9, 396.9, 372.92, 396.9, 394.43, 378.38, 396.9, 396.9, 396.9, 
         391.98, 396.9, 393.1, 396.9, 338.16, 396.9, 396.9, 376.11, 396.9, 329.46, 384.97, 
         370.22, 332.09, 314.64, 179.36, 2.6, 35.05, 28.79, 210.97, 88.27, 27.25, 21.57, 
         127.36, 16.45, 48.45, 318.75, 319.98, 291.55, 2.52, 3.65, 7.68, 24.65, 18.82, 
         96.73, 60.72, 83.45, 81.33, 97.95, 100.19, 100.63, 109.85, 27.49, 9.32, 68.95, 
         396.9, 391.45, 385.96, 395.69, 386.73, 240.52, 43.06, 318.01, 388.52, 396.9, 
         304.21, 0.32, 355.29, 385.09, 375.87, 6.68, 50.92, 10.48, 3.5, 272.21, 396.9, 
         255.23, 391.43, 396.9, 393.82, 396.9, 334.4, 22.01, 331.29, 368.74, 396.9, 396.9, 
         395.33, 393.37, 374.68, 352.58, 302.76, 396.21, 349.48, 379.7, 383.32, 396.9, 
         393.07, 395.28, 392.92, 370.73, 388.62, 392.68, 388.22, 395.09, 344.05, 318.43, 
         390.11, 396.9, 396.9, 396.9, 393.29, 396.9, 396.9, 396.9, 395.77, 396.9, 391.99, 
         396.9, 396.9, 393.45, 396.9), lstat = c(4.98, 9.14, 4.03, 2.94, 5.33, 5.21, 12.43, 
         19.15, 29.93, 17.1, 20.45, 13.27, 15.71, 8.26, 10.26, 8.47, 6.58, 14.67, 11.69, 
         11.28, 21.02, 13.83, 18.72, 19.88, 16.3, 16.51, 14.81, 17.28, 12.8, 11.98, 22.6, 
         13.04, 27.71, 18.35, 20.34, 9.68, 11.41, 8.77, 10.13, 4.32, 1.98, 4.84, 5.81, 
         7.44, 9.55, 10.21, 14.15, 18.8, 30.81, 16.2, 13.45, 9.43, 5.28, 8.43, 14.8, 4.81, 
         5.77, 3.95, 6.86, 9.22, 13.15, 14.44, 6.73, 9.5, 8.05, 4.67, 10.24, 8.1, 13.09, 
         8.79, 6.72, 9.88, 5.52, 7.54, 6.78, 8.94, 11.97, 10.27, 12.34, 9.1, 5.29, 7.22, 
         6.72, 7.51, 9.62, 6.53, 12.86, 8.44, 5.5, 5.7, 8.81, 8.2, 8.16, 6.21, 10.59, 
         6.65, 11.34, 4.21, 3.57, 6.19, 9.42, 7.67, 10.63, 13.44, 12.33, 16.47, 18.66, 
         14.09, 12.27, 15.55, 13, 10.16, 16.21, 17.09, 10.45, 15.76, 12.04, 10.3, 15.37, 
         13.61, 14.37, 14.27, 17.93, 25.41, 17.58, 14.81, 27.26, 17.19, 15.39, 18.34, 
         12.6, 12.26, 11.12, 15.03, 17.31, 16.96, 16.9, 14.59, 21.32, 18.46, 24.16, 34.41, 
         26.82, 26.42, 29.29, 27.8, 16.65, 29.53, 28.32, 21.45, 14.1, 13.28, 12.12, 15.79, 
         15.12, 15.02, 16.14, 4.59, 6.43, 7.39, 5.5, 1.73, 1.92, 3.32, 11.64, 9.81, 3.7, 
         12.14, 11.1, 11.32, 14.43, 12.03, 14.69, 9.04, 9.64, 5.33, 10.11, 6.29, 6.92, 
         5.04, 7.56, 9.45, 4.82, 5.68, 13.98, 13.15, 4.45, 6.68, 4.56, 5.39, 5.1, 4.69, 
         2.87, 5.03, 4.38, 2.97, 4.08, 8.61, 6.62, 4.56, 4.45, 7.43, 3.11, 3.81, 2.88, 
         10.87, 10.97, 18.06, 14.66, 23.09, 17.27, 23.98, 16.03, 9.38, 29.55, 9.47, 13.51, 
         9.69, 17.92, 10.5, 9.71, 21.46, 9.93, 7.6, 4.14, 4.63, 3.13, 6.36, 3.92, 3.76, 
         11.65, 5.25, 2.47, 3.95, 8.05, 10.88, 9.54, 4.73, 6.36, 7.37, 11.38, 12.4, 11.22, 
         5.19, 12.5, 18.46, 9.16, 10.15, 9.52, 6.56, 5.9, 3.59, 3.53, 3.54, 6.57, 9.25, 
         3.11, 5.12, 7.79, 6.9, 9.59, 7.26, 5.91, 11.25, 8.1, 10.45, 14.79, 7.44, 3.16, 
         13.65, 13, 6.59, 7.73, 6.58, 3.53, 2.98, 6.05, 4.16, 7.19, 4.85, 3.76, 4.59, 
         3.01, 3.16, 7.85, 8.23, 12.93, 7.14, 7.6, 9.51, 3.33, 3.56, 4.7, 8.58, 10.4, 
         6.27, 7.39, 15.84, 4.97, 4.74, 6.07, 9.5, 8.67, 4.86, 6.93, 8.93, 6.47, 7.53, 
         4.54, 9.97, 12.64, 5.98, 11.72, 7.9, 9.28, 11.5, 18.33, 15.94, 10.36, 12.73, 
         7.2, 6.87, 7.7, 11.74, 6.12, 5.08, 6.15, 12.79, 9.97, 7.34, 9.09, 12.43, 7.83, 
         5.68, 6.75, 8.01, 9.8, 10.56, 8.51, 9.74, 9.29, 5.49, 8.65, 7.18, 4.61, 10.53, 
         12.67, 6.36, 5.99, 5.89, 5.98, 5.49, 7.79, 4.5, 8.05, 5.57, 17.6, 13.27, 11.48, 
         12.67, 7.79, 14.19, 10.19, 14.64, 5.29, 7.12, 14, 13.33, 3.26, 3.73, 2.96, 9.53, 
         8.88, 34.77, 37.97, 13.44, 23.24, 21.24, 23.69, 21.78, 17.21, 21.08, 23.6, 24.56, 
         30.63, 30.81, 28.28, 31.99, 30.62, 20.85, 17.11, 18.76, 25.68, 15.17, 16.35, 
         17.12, 19.37, 19.92, 30.59, 29.97, 26.77, 20.32, 20.31, 19.77, 27.38, 22.98, 
         23.34, 12.13, 26.4, 19.78, 10.11, 21.22, 34.37, 20.08, 36.98, 29.05, 25.79, 26.64, 
         20.62, 22.74, 15.02, 15.7, 14.1, 23.29, 17.16, 24.39, 15.69, 14.52, 21.52, 24.08, 
         17.64, 19.69, 12.03, 16.22, 15.17, 23.27, 18.05, 26.45, 34.02, 22.88, 22.11, 
         19.52, 16.59, 18.85, 23.79, 23.98, 17.79, 16.44, 18.13, 19.31, 17.44, 17.73, 
         17.27, 16.74, 18.71, 18.13, 19.01, 16.94, 16.23, 14.7, 16.42, 14.65, 13.99, 10.29, 
         13.22, 14.13, 17.15, 21.32, 18.13, 14.76, 16.29, 12.87, 14.36, 11.66, 18.14, 
         24.1, 18.68, 24.91, 18.03, 13.11, 10.74, 7.74, 7.01, 10.42, 13.34, 10.58, 14.98, 
         11.45, 18.06, 23.97, 29.68, 18.07, 13.35, 12.01, 13.59, 17.6, 21.14, 14.1, 12.92, 
         15.1, 14.33, 9.67, 9.08, 5.64, 6.48, 7.88), medv = c(24, 21.6, 34.7, 33.4, 36.2, 
         28.7, 22.9, 27.1, 16.5, 18.9, 15, 18.9, 21.7, 20.4, 18.2, 19.9, 23.1, 17.5, 20.2, 
         18.2, 13.6, 19.6, 15.2, 14.5, 15.6, 13.9, 16.6, 14.8, 18.4, 21, 12.7, 14.5, 13.2, 
         13.1, 13.5, 18.9, 20, 21, 24.7, 30.8, 34.9, 26.6, 25.3, 24.7, 21.2, 19.3, 20, 
         16.6, 14.4, 19.4, 19.7, 20.5, 25, 23.4, 18.9, 35.4, 24.7, 31.6, 23.3, 19.6, 18.7, 
         16, 22.2, 25, 33, 23.5, 19.4, 22, 17.4, 20.9, 24.2, 21.7, 22.8, 23.4, 24.1, 21.4, 
         20, 20.8, 21.2, 20.3, 28, 23.9, 24.8, 22.9, 23.9, 26.6, 22.5, 22.2, 23.6, 28.7, 
         22.6, 22, 22.9, 25, 20.6, 28.4, 21.4, 38.7, 43.8, 33.2, 27.5, 26.5, 18.6, 19.3, 
         20.1, 19.5, 19.5, 20.4, 19.8, 19.4, 21.7, 22.8, 18.8, 18.7, 18.5, 18.3, 21.2, 
         19.2, 20.4, 19.3, 22, 20.3, 20.5, 17.3, 18.8, 21.4, 15.7, 16.2, 18, 14.3, 19.2, 
         19.6, 23, 18.4, 15.6, 18.1, 17.4, 17.1, 13.3, 17.8, 14, 14.4, 13.4, 15.6, 11.8, 
         13.8, 15.6, 14.6, 17.8, 15.4, 21.5, 19.6, 15.3, 19.4, 17, 15.6, 13.1, 41.3, 24.3, 
         23.3, 27, 50, 50, 50, 22.7, 25, 50, 23.8, 23.8, 22.3, 17.4, 19.1, 23.1, 23.6, 
         22.6, 29.4, 23.2, 24.6, 29.9, 37.2, 39.8, 36.2, 37.9, 32.5, 26.4, 29.6, 50, 32, 
         29.8, 34.9, 37, 30.5, 36.4, 31.1, 29.1, 50, 33.3, 30.3, 34.6, 34.9, 32.9, 24.1, 
         42.3, 48.5, 50, 22.6, 24.4, 22.5, 24.4, 20, 21.7, 19.3, 22.4, 28.1, 23.7, 25, 
         23.3, 28.7, 21.5, 23, 26.7, 21.7, 27.5, 30.1, 44.8, 50, 37.6, 31.6, 46.7, 31.5, 
         24.3, 31.7, 41.7, 48.3, 29, 24, 25.1, 31.5, 23.7, 23.3, 22, 20.1, 22.2, 23.7, 
         17.6, 18.5, 24.3, 20.5, 24.5, 26.2, 24.4, 24.8, 29.6, 42.8, 21.9, 20.9, 44, 50, 
         36, 30.1, 33.8, 43.1, 48.8, 31, 36.5, 22.8, 30.7, 50, 43.5, 20.7, 21.1, 25.2, 
         24.4, 35.2, 32.4, 32, 33.2, 33.1, 29.1, 35.1, 45.4, 35.4, 46, 50, 32.2, 22, 20.1, 
         23.2, 22.3, 24.8, 28.5, 37.3, 27.9, 23.9, 21.7, 28.6, 27.1, 20.3, 22.5, 29, 24.8, 
         22, 26.4, 33.1, 36.1, 28.4, 33.4, 28.2, 22.8, 20.3, 16.1, 22.1, 19.4, 21.6, 23.8, 
         16.2, 17.8, 19.8, 23.1, 21, 23.8, 23.1, 20.4, 18.5, 25, 24.6, 23, 22.2, 19.3, 
         22.6, 19.8, 17.1, 19.4, 22.2, 20.7, 21.1, 19.5, 18.5, 20.6, 19, 18.7, 32.7, 16.5, 
         23.9, 31.2, 17.5, 17.2, 23.1, 24.5, 26.6, 22.9, 24.1, 18.6, 30.1, 18.2, 20.6, 
         17.8, 21.7, 22.7, 22.6, 25, 19.9, 20.8, 16.8, 21.9, 27.5, 21.9, 23.1, 50, 50, 
         50, 50, 50, 13.8, 13.8, 15, 13.9, 13.3, 13.1, 10.2, 10.4, 10.9, 11.3, 12.3, 8.8, 
         7.2, 10.5, 7.4, 10.2, 11.5, 15.1, 23.2, 9.7, 13.8, 12.7, 13.1, 12.5, 8.5, 5, 
         6.3, 5.6, 7.2, 12.1, 8.3, 8.5, 5, 11.9, 27.9, 17.2, 27.5, 15, 17.2, 17.9, 16.3, 
         7, 7.2, 7.5, 10.4, 8.8, 8.4, 16.7, 14.2, 20.8, 13.4, 11.7, 8.3, 10.2, 10.9, 11, 
         9.5, 14.5, 14.1, 16.1, 14.3, 11.7, 13.4, 9.6, 8.7, 8.4, 12.8, 10.5, 17.1, 18.4, 
         15.4, 10.8, 11.8, 14.9, 12.6, 14.1, 13, 13.4, 15.2, 16.1, 17.8, 14.9, 14.1, 12.7, 
         13.5, 14.9, 20, 16.4, 17.7, 19.5, 20.2, 21.4, 19.9, 19, 19.1, 19.1, 20.1, 19.9, 
         19.6, 23.2, 29.8, 13.8, 13.3, 16.7, 12, 14.6, 21.4, 23, 23.7, 25, 21.8, 20.6, 
         21.2, 19.1, 20.6, 15.2, 7, 8.1, 13.6, 20.1, 21.8, 24.5, 23.1, 19.7, 18.3, 21.2, 
         17.5, 16.8, 22.4, 20.6, 23.9, 22, 11.9)), row.names = c("1", "2", "3", "4", "5", 
         "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
         "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", 
         "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", 
         "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", 
         "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", 
         "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", 
         "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
         "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", 
         "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", 
         "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", 
         "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", 
         "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", 
         "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", 
         "165", "166", "167", "168", "169", "170", "171", "172", "173", "174", "175", 
         "176", "177", "178", "179", "180", "181", "182", "183", "184", "185", "186", 
         "187", "188", "189", "190", "191", "192", "193", "194", "195", "196", "197", 
         "198", "199", "200", "201", "202", "203", "204", "205", "206", "207", "208", 
         "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "219", 
         "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", 
         "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", 
         "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", 
         "253", "254", "255", "256", "257", "258", "259", "260", "261", "262", "263", 
         "264", "265", "266", "267", "268", "269", "270", "271", "272", "273", "274", 
         "275", "276", "277", "278", "279", "280", "281", "282", "283", "284", "285", 
         "286", "287", "288", "289", "290", "291", "292", "293", "294", "295", "296", 
         "297", "298", "299", "300", "301", "302", "303", "304", "305", "306", "307", 
         "308", "309", "310", "311", "312", "313", "314", "315", "316", "317", "318", 
         "319", "320", "321", "322", "323", "324", "325", "326", "327", "328", "329", 
         "330", "331", "332", "333", "334", "335", "336", "337", "338", "339", "340", 
         "341", "342", "343", "344", "345", "346", "347", "348", "349", "350", "351", 
         "352", "353", "354", "355", "356", "357", "358", "359", "360", "361", "362", 
         "363", "364", "365", "366", "367", "368", "369", "370", "371", "372", "373", 
         "374", "375", "376", "377", "378", "379", "380", "381", "382", "383", "384", 
         "385", "386", "387", "388", "389", "390", "391", "392", "393", "394", "395", 
         "396", "397", "398", "399", "400", "401", "402", "403", "404", "405", "406", 
         "407", "408", "409", "410", "411", "412", "413", "414", "415", "416", "417", 
         "418", "419", "420", "421", "422", "423", "424", "425", "426", "427", "428", 
         "429", "430", "431", "432", "433", "434", "435", "436", "437", "438", "439", 
         "440", "441", "442", "443", "444", "445", "446", "447", "448", "449", "450", 
         "451", "452", "453", "454", "455", "456", "457", "458", "459", "460", "461", 
         "462", "463", "464", "465", "466", "467", "468", "469", "470", "471", "472", 
         "473", "474", "475", "476", "477", "478", "479", "480", "481", "482", "483", 
         "484", "485", "486", "487", "488", "489", "490", "491", "492", "493", "494", 
         "495", "496", "497", "498", "499", "500", "501", "502", "503", "504", "505", 
         "506"), class = "data.frame"), uniform = TRUE, aggregate.fun = function (x, ...) 
         UseMethod("mean"), predict.fun = function (object, newdata, ...) 
         {
             pred = do.call("predict", c(list(object = object, newdata = newdata), list(...)))
             point = switch(object$task.desc$type, regr = getPredictionResponse(pred), 
                 surv = getPredictionResponse(pred), classif = if (object$learner$predict.type == 
                     "response") getPredictionResponse(pred) else getPredictionProbabilities(pred))
             if (object$learner$predict.type == "se") 
                 cbind(preds = point, se = getPredictionSE(pred))
             else point
         }, n = c(4, 10))
  5: mp[, as.list(unlist(lapply(.SD, aggregate.fun))), by = vars]
  6: `[.data.table`(mp, , as.list(unlist(lapply(.SD, aggregate.fun))), by = vars)
  
  ── 9. Error: generateThreshVsPerfData (@test_base_generateThreshVsPerf.R#25)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: generateThreshVsPerfData(r, list(tpr, fpr)) at testthat/test_base_generateThreshVsPerf.R:25
  2: generateThreshVsPerfData.ResampleResult(r, list(tpr, fpr))
  3: generateThreshVsPerfData.Prediction(obj, measures, gridsize, aggregate)
  4: generateThreshVsPerfData.list(namedList("prediction", obj), measures, gridsize, aggregate, 
         task.id)
  5: lapply(obj, function(x) {
         do.call("rbind", lapply(grid$threshold, function(th) {
             pp = setThreshold(x, threshold = th)
             if (!aggregate && resamp) {
                 iter = seq_len(pp$instance$desc$iters)
                 asMatrixRows(lapply(iter, function(i) {
                     pp$data = pp$data[pp$data$iter == i, ]
                     c(setNames(performance(pp, measures = measures), mids), iter = i, 
                       threshold = th)
                 }))
             }
             else {
                 c(setNames(performance(pp, measures = measures), mids), threshold = th)
             }
         }))
     })
  6: FUN(X[[i]], ...)
  7: do.call("rbind", lapply(grid$threshold, function(th) {
         pp = setThreshold(x, threshold = th)
         if (!aggregate && resamp) {
             iter = seq_len(pp$instance$desc$iters)
             asMatrixRows(lapply(iter, function(i) {
                 pp$data = pp$data[pp$data$iter == i, ]
                 c(setNames(performance(pp, measures = measures), mids), iter = i, threshold = th)
             }))
         }
         else {
             c(setNames(performance(pp, measures = measures), mids), threshold = th)
         }
     }))
  8: lapply(grid$threshold, function(th) {
         pp = setThreshold(x, threshold = th)
         if (!aggregate && resamp) {
             iter = seq_len(pp$instance$desc$iters)
             asMatrixRows(lapply(iter, function(i) {
                 pp$data = pp$data[pp$data$iter == i, ]
                 c(setNames(performance(pp, measures = measures), mids), iter = i, threshold = th)
             }))
         }
         else {
             c(setNames(performance(pp, measures = measures), mids), threshold = th)
         }
     })
  9: FUN(X[[i]], ...)
  10: setNames(performance(pp, measures = measures), mids)
  11: performance(pp, measures = measures)
  12: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  13: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  14: FUN(X[[i]], ...)
  15: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  16: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 10. Error: measures ppv denominator 0 (@test_base_measures.R#886)  ──────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: generateThreshVsPerfData(r, measures = list(tpr, ppv), gridsize = 5) at testthat/test_base_measures.R:886
  2: generateThreshVsPerfData.ResampleResult(r, measures = list(tpr, ppv), gridsize = 5)
  3: generateThreshVsPerfData.Prediction(obj, measures, gridsize, aggregate)
  4: generateThreshVsPerfData.list(namedList("prediction", obj), measures, gridsize, aggregate, 
         task.id)
  5: lapply(obj, function(x) {
         do.call("rbind", lapply(grid$threshold, function(th) {
             pp = setThreshold(x, threshold = th)
             if (!aggregate && resamp) {
                 iter = seq_len(pp$instance$desc$iters)
                 asMatrixRows(lapply(iter, function(i) {
                     pp$data = pp$data[pp$data$iter == i, ]
                     c(setNames(performance(pp, measures = measures), mids), iter = i, 
                       threshold = th)
                 }))
             }
             else {
                 c(setNames(performance(pp, measures = measures), mids), threshold = th)
             }
         }))
     })
  6: FUN(X[[i]], ...)
  7: do.call("rbind", lapply(grid$threshold, function(th) {
         pp = setThreshold(x, threshold = th)
         if (!aggregate && resamp) {
             iter = seq_len(pp$instance$desc$iters)
             asMatrixRows(lapply(iter, function(i) {
                 pp$data = pp$data[pp$data$iter == i, ]
                 c(setNames(performance(pp, measures = measures), mids), iter = i, threshold = th)
             }))
         }
         else {
             c(setNames(performance(pp, measures = measures), mids), threshold = th)
         }
     }))
  8: lapply(grid$threshold, function(th) {
         pp = setThreshold(x, threshold = th)
         if (!aggregate && resamp) {
             iter = seq_len(pp$instance$desc$iters)
             asMatrixRows(lapply(iter, function(i) {
                 pp$data = pp$data[pp$data$iter == i, ]
                 c(setNames(performance(pp, measures = measures), mids), iter = i, threshold = th)
             }))
         }
         else {
             c(setNames(performance(pp, measures = measures), mids), threshold = th)
         }
     })
  9: FUN(X[[i]], ...)
  10: setNames(performance(pp, measures = measures), mids)
  11: performance(pp, measures = measures)
  12: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  13: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  14: FUN(X[[i]], ...)
  15: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  16: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 11. Error: multilabel learning (@test_base_multilabel.R#36)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: getMultilabelBinaryPerformances(r$pred, list(mmce, acc)) at testthat/test_base_multilabel.R:36
  2: performance(predi, measure)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  7: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 12. Error: MultilabelBinaryRelevanceModel (@test_base_multilabel.R#120)  ────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 13. Error: MultilabelDBRModel (@test_base_multilabel.R#120)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 14. Error: MultilabelClassifierChainsModel (@test_base_multilabel.R#120)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 15. Error: MultilabelNestedStackingModel (@test_base_multilabel.R#120)  ─────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 16. Error: MultilabelStackingModel (@test_base_multilabel.R#120)  ───────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 17. Error: MultilabelClassifierChainsModel (@test_base_multilabel.R#120)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 18. Error: MultilabelNestedStackingModel (@test_base_multilabel.R#120)  ─────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneThreshold(r$pred, nsub = 2L, control = list(maxit = 2L)) at testthat/test_base_multilabel.R:120
  2: cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
  3: apply(vx, 2, function(x) fn(x, ...) * fnscale)
  4: FUN(newX[, i], ...)
  5: fn(x, ...)
  6: performance(setThreshold(pred, x), measure, task, model)
  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: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  11: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 19. Error: performance (@test_base_performance.R#32)  ───────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: performance(r$pred, measures = mymeasure, task = binaryclass.task) at testthat/test_base_performance.R:32
  2: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  3: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  4: FUN(X[[i]], ...)
  5: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  6: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 20. Error: performance works with ResamplePrediction (@test_base_performance.
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: performance(rf$pred) at testthat/test_base_performance.R:101
  2: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  3: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  4: FUN(X[[i]], ...)
  5: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  6: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 21. Error: plotBMRRanksAsBarChart (@test_base_plotBMRRanksAsBarChart.R#12)  ─
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: plotBMRRanksAsBarChart(res) at testthat/test_base_plotBMRRanksAsBarChart.R:12
  2: as.data.frame(convertBMRToRankMatrix(bmr, measure, ties.method = ties.method, aggregation = aggregation))
  3: convertBMRToRankMatrix(bmr, measure, ties.method = ties.method, aggregation = aggregation)
  4: df[, `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id"]
  5: `[.data.table`(df, , `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id")
  
  ── 22. Error: test_CritDifferences (@test_base_plotCritDifferences.R#16)  ──────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_warning({
         r1 = generateCritDifferencesData(res)
     }) at testthat/test_base_plotCritDifferences.R:16
  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: generateCritDifferencesData(res) at testthat/test_base_plotCritDifferences.R:16
  7: rowMeans(convertBMRToRankMatrix(bmr, measure))
  8: is.data.frame(x)
  9: convertBMRToRankMatrix(bmr, measure)
  10: df[, `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id"]
  11: `[.data.table`(df, , `:=`("alg.rank", rank(.SD$x, ties.method = ties.method)), by = "task.id")
  
  ── 23. Error: threshold tuning with feature selection (@test_base_selectFeatures
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: selectFeatures(lrn, task = binaryclass.task, resampling = rdesc, control = ctrl, 
         show.info = FALSE) at testthat/test_base_selectFeatures.R:45
  2: sel.func(learner, task, resampling, measures, bit.names, bits.to.features, control, 
         opt.path, show.info)
  3: evalOptimizationStatesFeatSel(learner, task, resampling, measures, bits.to.features, 
         control, opt.path, show.info, states, 1L, NA_integer_)
  4: evalOptimizationStates(learner, task, resampling, measures, NULL, bits.to.features, 
         control, opt.path, show.info, states, dobs, eols, FALSE, resample, "mlr.selectFeatures")
  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 = "classif.rpart", 
         type = "classif", package = "rpart", properties = c("twoclass", "multiclass", 
         "missings", "numerics", "factors", "ordered", "prob", "weights", "featimp"), 
         par.set = structure(list(pars = list(minsplit = structure(list(id = "minsplit", 
             type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), parms = structure(list(
             id = "parms", 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"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), par.vals = list(
             xval = 0L), predict.type = "prob", name = "Decision Tree", short.name = "rpart", 
         note = "`xval` has been set to `0` by default for speed.", callees = c("rpart", 
         "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines.", 
             parms = "Argument of: rpart::rpart\n\noptional parameters for the splitting function. Anova splitting has no parameters. Poisson splitting has a single parameter, the coefficient of variation of the prior distribution on the rates.  The default value is 1. Exponential splitting has the same parameter as Poisson. For classification splitting, the list can contain any of: the vector of prior probabilities (component prior), the loss matrix (component loss) or the splitting index (component split).  The priors must be positive and sum to 1.  The loss matrix must have zeros on the diagonal and positive off-diagonal elements.  The splitting index can be gini or information.  The default priors are proportional to the data counts, the losses default to 1, and the split defaults to gini."), 
         config = list(), fix.factors.prediction = FALSE), class = c("classif.rpart", 
     "RLearnerClassif", "RLearner", "Learner")), 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), resampling = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(60L, 164L, 85L, 182L, 192L, 10L, 
     107L, 180L, 111L, 91L, 190L, 90L, 133L, 112L, 20L, 174L, 48L, 9L, 63L, 181L, 168L, 
     130L, 120L, 184L, 121L, 187L, 100L, 108L, 53L, 27L, 172L, 160L, 122L, 140L, 5L, 83L, 
     131L, 38L, 55L, 40L, 24L, 70L, 69L, 61L, 26L, 23L, 171L, 76L, 43L, 137L, 8L, 167L, 
     125L, 19L, 87L, 32L, 194L, 114L, 135L, 56L, 99L, 14L, 57L, 169L, 118L, 65L, 116L, 
     115L, 195L, 62L, 105L, 154L, 97L, 1L, 64L, 30L, 51L, 81L, 46L, 15L, 153L, 206L, 201L, 
     148L, 13L, 54L, 185L, 109L, 202L, 21L, 16L, 77L, 145L, 161L, 37L, 22L, 88L, 11L, 
     52L, 149L, 143L, 36L, 110L, 101L, 132L, 92L, 94L, 139L, 42L, 129L, 103L, 196L, 6L, 
     199L, 68L, 147L, 104L, 159L, 126L, 151L, 58L, 28L, 179L, 155L, 128L, 82L, 124L, 158L, 
     12L, 170L, 49L, 166L, 106L, 176L, 39L, 78L, 208L, 75L)), test.inds = list(c(204L, 
     84L, 3L, 47L, 98L, 200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 
     142L, 50L, 152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 
     72L, 150L, 45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 
     186L, 183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
     188L, 141L, 59L, 162L, 173L, 31L, 89L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         measures = list(structure(list(id = "mmce", minimize = TRUE, properties = c("classif", 
         "classif.multi", "req.pred", "req.truth"), fun = function (task, model, pred, 
             feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
             note = "Defined as: mean(response != truth)", 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 = NULL, bits.to.features = function (x, task) 
         binaryToFeatures(x, getTaskFeatureNames(task)), control = structure(list(same.resampling.instance = TRUE, 
             impute.val = 1, tune.threshold = TRUE, tune.threshold.args = list(nsub = 2L), 
             log.fun = function (learner, task, resampling, measures, par.set, control, 
                 opt.path, dob, x, y, remove.nas, stage, prev.stage) 
             {
                 x.string = sprintf("%s (%i bits)", clipString(collapse(x, ""), 80L), 
                     sum(x))
                 logFunDefault(learner, task, resampling, measures, par.set, control, 
                     opt.path, dob, x.string, y, remove.nas, stage, prev.stage, prefixes = c("FeatSel-x", 
                       "FeatSel-y"))
             }, final.dw.perc = NULL, extra.args = list(prob = 0.5), maxit = 2L, max.features = NA_integer_), class = c("FeatSelControlRandom", 
         "FeatSelControl", "OptControl")), opt.path = structure(list(par.set = structure(list(
             pars = list(V1 = structure(list(id = "V1", type = "integer", len = 1L, lower = -Inf, 
                 upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                 default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V2 = structure(list(id = "V2", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V3 = structure(list(id = "V3", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V4 = structure(list(id = "V4", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V5 = structure(list(id = "V5", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V6 = structure(list(id = "V6", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V7 = structure(list(id = "V7", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V8 = structure(list(id = "V8", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V9 = structure(list(id = "V9", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V10 = structure(list(id = "V10", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V11 = structure(list(id = "V11", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V12 = structure(list(id = "V12", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V13 = structure(list(id = "V13", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V14 = structure(list(id = "V14", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V15 = structure(list(id = "V15", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V16 = structure(list(id = "V16", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V17 = structure(list(id = "V17", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V18 = structure(list(id = "V18", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V19 = structure(list(id = "V19", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V20 = structure(list(id = "V20", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V21 = structure(list(id = "V21", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V22 = structure(list(id = "V22", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V23 = structure(list(id = "V23", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V24 = structure(list(id = "V24", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V25 = structure(list(id = "V25", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V26 = structure(list(id = "V26", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V27 = structure(list(id = "V27", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V28 = structure(list(id = "V28", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V29 = structure(list(id = "V29", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V30 = structure(list(id = "V30", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V31 = structure(list(id = "V31", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V32 = structure(list(id = "V32", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V33 = structure(list(id = "V33", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V34 = structure(list(id = "V34", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V35 = structure(list(id = "V35", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V36 = structure(list(id = "V36", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V37 = structure(list(id = "V37", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V38 = structure(list(id = "V38", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V39 = structure(list(id = "V39", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V40 = structure(list(id = "V40", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V41 = structure(list(id = "V41", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V42 = structure(list(id = "V42", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V43 = structure(list(id = "V43", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V44 = structure(list(id = "V44", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V45 = structure(list(id = "V45", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V46 = structure(list(id = "V46", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V47 = structure(list(id = "V47", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V48 = structure(list(id = "V48", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V49 = structure(list(id = "V49", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V50 = structure(list(id = "V50", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V51 = structure(list(id = "V51", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V52 = structure(list(id = "V52", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V53 = structure(list(id = "V53", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V54 = structure(list(id = "V54", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V55 = structure(list(id = "V55", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V56 = structure(list(id = "V56", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V57 = structure(list(id = "V57", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V58 = structure(list(id = "V58", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V59 = structure(list(id = "V59", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, has.default = FALSE, 
                     default = NULL, trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 V60 = structure(list(id = "V60", type = "integer", len = 1L, lower = -Inf, 
                     upper = Inf, 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 = "mmce.test.mean", minimize = c(mmce.test.mean = TRUE), 
             add.transformed.x = FALSE, env = <environment>), class = c("OptPathDF", "OptPath"
         )), show.info = FALSE, remove.nas = FALSE, 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: do.call(tuneThreshold, th.args)
  9: (function (pred, measure, task, model, nsub = 20L, control = list()) 
     {
         checkPrediction(pred, task.type = c("classif", "multilabel"), predict.type = "prob")
         td = pred$task.desc
         ttype = td$type
         measure = checkMeasures(measure, td)[[1L]]
         if (!missing(task)) 
             assertClass(task, classes = "SupervisedTask")
         if (!missing(model)) 
             assertClass(model, classes = "WrappedModel")
         assertList(control)
         probs = getPredictionProbabilities(pred)
         if (anyMissing(probs)) {
             return(list(th = NA, pred = pred, th.seq = numeric(0), perf = numeric(0)))
         }
         cls = pred$task.desc$class.levels
         k = length(cls)
         fitn = function(x) {
             if (ttype == "multilabel" || k > 2) 
                 names(x) = cls
             performance(setThreshold(pred, x), measure, task, model)
         }
         if (ttype == "multilabel" || k > 2L) {
             requirePackages("cmaes", why = "tuneThreshold", default.method = "load")
             start = rep(0.5, k)
             or = cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
             th = or$par/sum(or$par)
             names(th) = cls
             perf = or$val
         }
         else {
             or = optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, 
                 nsub = nsub)
             th = or[[1]]
             perf = or$objective
         }
         return(list(th = th, perf = perf))
     })(nsub = 2L, pred = structure(list(instance = structure(list(desc = structure(list(
         split = 0.666666666666667, id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(60L, 164L, 85L, 182L, 192L, 10L, 
     107L, 180L, 111L, 91L, 190L, 90L, 133L, 112L, 20L, 174L, 48L, 9L, 63L, 181L, 168L, 
     130L, 120L, 184L, 121L, 187L, 100L, 108L, 53L, 27L, 172L, 160L, 122L, 140L, 5L, 83L, 
     131L, 38L, 55L, 40L, 24L, 70L, 69L, 61L, 26L, 23L, 171L, 76L, 43L, 137L, 8L, 167L, 
     125L, 19L, 87L, 32L, 194L, 114L, 135L, 56L, 99L, 14L, 57L, 169L, 118L, 65L, 116L, 
     115L, 195L, 62L, 105L, 154L, 97L, 1L, 64L, 30L, 51L, 81L, 46L, 15L, 153L, 206L, 201L, 
     148L, 13L, 54L, 185L, 109L, 202L, 21L, 16L, 77L, 145L, 161L, 37L, 22L, 88L, 11L, 
     52L, 149L, 143L, 36L, 110L, 101L, 132L, 92L, 94L, 139L, 42L, 129L, 103L, 196L, 6L, 
     199L, 68L, 147L, 104L, 159L, 126L, 151L, 58L, 28L, 179L, 155L, 128L, 82L, 124L, 158L, 
     12L, 170L, 49L, 166L, 106L, 176L, 39L, 78L, 208L, 75L)), test.inds = list(c(204L, 
     84L, 3L, 47L, 98L, 200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 
     142L, 50L, 152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 
     72L, 150L, 45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 
     186L, 183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
     188L, 141L, 59L, 162L, 173L, 31L, 89L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         predict.type = "prob", data = structure(list(id = c(204L, 84L, 3L, 47L, 98L, 
         200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 142L, 50L, 
         152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 72L, 150L, 
         45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 186L, 
         183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
         188L, 141L, 59L, 162L, 173L, 31L, 89L), truth = structure(c(1L, 2L, 2L, 2L, 1L, 
         1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 
         1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 
         1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
         2L, 1L, 1L, 2L, 2L), .Label = c("M", "R"), class = "factor"), prob.M = c(0.808823529411765, 
         0.808823529411765, 0.808823529411765, 0.808823529411765, 0.818181818181818, 0.808823529411765, 
         0.0487804878048781, 0.808823529411765, 0.808823529411765, 0.0487804878048781, 
         0.808823529411765, 0.0487804878048781, 0.808823529411765, 0.0487804878048781, 
         0.808823529411765, 0.808823529411765, 0.808823529411765, 0.808823529411765, 0.808823529411765, 
         0.808823529411765, 0.0487804878048781, 0.0487804878048781, 0.808823529411765, 
         0.808823529411765, 0.808823529411765, 0.808823529411765, 0.808823529411765, 0.808823529411765, 
         0.808823529411765, 0.388888888888889, 0.808823529411765, 0.0487804878048781, 
         0.0487804878048781, 0.808823529411765, 0.0487804878048781, 0.808823529411765, 
         0.808823529411765, 0.818181818181818, 0.808823529411765, 0.818181818181818, 0.0487804878048781, 
         0.808823529411765, 0.0487804878048781, 0.808823529411765, 0.0487804878048781, 
         0.0487804878048781, 0.388888888888889, 0.808823529411765, 0.808823529411765, 
         0.808823529411765, 0.808823529411765, 0.808823529411765, 0.0487804878048781, 
         0.0487804878048781, 0.808823529411765, 0.808823529411765, 0.808823529411765, 
         0.388888888888889, 0.808823529411765, 0.0487804878048781, 0.818181818181818, 
         0.808823529411765, 0.808823529411765, 0.808823529411765, 0.0487804878048781, 
         0.0487804878048781, 0.808823529411765, 0.808823529411765, 0.808823529411765, 
         0.808823529411765), prob.R = c(0.191176470588235, 0.191176470588235, 0.191176470588235, 
         0.191176470588235, 0.181818181818182, 0.191176470588235, 0.951219512195122, 0.191176470588235, 
         0.191176470588235, 0.951219512195122, 0.191176470588235, 0.951219512195122, 0.191176470588235, 
         0.951219512195122, 0.191176470588235, 0.191176470588235, 0.191176470588235, 0.191176470588235, 
         0.191176470588235, 0.191176470588235, 0.951219512195122, 0.951219512195122, 0.191176470588235, 
         0.191176470588235, 0.191176470588235, 0.191176470588235, 0.191176470588235, 0.191176470588235, 
         0.191176470588235, 0.611111111111111, 0.191176470588235, 0.951219512195122, 0.951219512195122, 
         0.191176470588235, 0.951219512195122, 0.191176470588235, 0.191176470588235, 0.181818181818182, 
         0.191176470588235, 0.181818181818182, 0.951219512195122, 0.191176470588235, 0.951219512195122, 
         0.191176470588235, 0.951219512195122, 0.951219512195122, 0.611111111111111, 0.191176470588235, 
         0.191176470588235, 0.191176470588235, 0.191176470588235, 0.191176470588235, 0.951219512195122, 
         0.951219512195122, 0.191176470588235, 0.191176470588235, 0.191176470588235, 0.611111111111111, 
         0.191176470588235, 0.951219512195122, 0.181818181818182, 0.191176470588235, 0.191176470588235, 
         0.191176470588235, 0.951219512195122, 0.951219512195122, 0.191176470588235, 0.191176470588235, 
         0.191176470588235, 0.191176470588235), response = structure(c(1L, 1L, 1L, 1L, 
         1L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 
         2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 
         2L, 2L, 1L, 1L, 1L, 1L), .Label = c("M", "R"), class = "factor"), iter = c(1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), set = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L), .Label = "test", class = "factor")), row.names = c(NA, -70L), class = "data.frame"), 
         threshold = c(M = 0.5, R = 0.5), task.desc = structure(list(id = "binary", type = "classif", 
             target = "Class", size = 208L, n.feat = c(numerics = 27L, 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 = structure(list(
                 c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), time = 0.00399999999996226), class = c("ResamplePrediction", 
     "PredictionClassif", "Prediction")), measure = structure(list(id = "mmce", minimize = TRUE, 
         properties = c("classif", "classif.multi", "req.pred", "req.truth"), fun = function (task, 
             model, pred, feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
         note = "Defined as: mean(response != truth)", 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"))
  10: optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, nsub = nsub)
  11: optimize(f = f, interval = interval, maximum = maximum, tol = tol)
  12: (function (arg) 
     f(arg, ...))(0.381966011250105)
  13: f(arg, ...)
  14: performance(setThreshold(pred, x), measure, task, model)
  15: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  16: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  17: FUN(X[[i]], ...)
  18: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  19: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 24. Error: tune (@test_base_tuning.R#40)  ───────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneParams(lrn2, binaryclass.task, rdesc, par.set = ps1, control = ctrl) at testthat/test_base_tuning.R:40
  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, xs, dobs = seq_along(xs), eols = NA_integer_, remove.nas = TRUE, 
         resample.fun = 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 = "classif.rpart", 
         type = "classif", package = "rpart", properties = c("twoclass", "multiclass", 
         "missings", "numerics", "factors", "ordered", "prob", "weights", "featimp"), 
         par.set = structure(list(pars = list(minsplit = structure(list(id = "minsplit", 
             type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), parms = structure(list(
             id = "parms", 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"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), par.vals = list(
             xval = 0L), predict.type = "prob", name = "Decision Tree", short.name = "rpart", 
         note = "`xval` has been set to `0` by default for speed.", callees = c("rpart", 
         "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines.", 
             parms = "Argument of: rpart::rpart\n\noptional parameters for the splitting function. Anova splitting has no parameters. Poisson splitting has a single parameter, the coefficient of variation of the prior distribution on the rates.  The default value is 1. Exponential splitting has the same parameter as Poisson. For classification splitting, the list can contain any of: the vector of prior probabilities (component prior), the loss matrix (component loss) or the splitting index (component split).  The priors must be positive and sum to 1.  The loss matrix must have zeros on the diagonal and positive off-diagonal elements.  The splitting index can be gini or information.  The default priors are proportional to the data counts, the losses default to 1, and the split defaults to gini."), 
         config = list(), fix.factors.prediction = FALSE), class = c("classif.rpart", 
     "RLearnerClassif", "RLearner", "Learner")), 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), resampling = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(164L, 85L, 182L, 193L, 10L, 108L, 
     181L, 111L, 92L, 191L, 90L, 134L, 113L, 21L, 175L, 48L, 9L, 63L, 206L, 169L, 131L, 
     120L, 185L, 122L, 188L, 100L, 109L, 53L, 27L, 173L, 161L, 123L, 141L, 5L, 84L, 132L, 
     38L, 55L, 40L, 25L, 70L, 168L, 62L, 26L, 23L, 172L, 76L, 43L, 138L, 8L, 167L, 126L, 
     20L, 87L, 32L, 156L, 115L, 136L, 57L, 183L, 15L, 150L, 41L, 119L, 65L, 116L, 143L, 
     196L, 166L, 105L, 155L, 98L, 1L, 144L, 30L, 51L, 81L, 47L, 148L, 154L, 86L, 54L, 
     149L, 13L, 127L, 186L, 190L, 203L, 22L, 16L, 78L, 146L, 77L, 37L, 187L, 89L, 11L, 
     52L, 147L, 66L, 36L, 202L, 102L, 133L, 93L, 95L, 199L, 42L, 130L, 104L, 197L, 6L, 
     91L, 69L, 14L, 201L, 88L, 124L, 152L, 58L, 29L, 180L, 19L, 129L, 83L, 125L, 159L, 
     12L, 56L, 49L, 158L, 99L, 110L, 170L, 79L, 60L, 162L, 118L)), test.inds = list(c(3L, 
     145L, 75L, 94L, 121L, 135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 
     96L, 71L, 189L, 192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 
     142L, 17L, 59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 
     103L, 177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
     198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         measures = list(structure(list(id = "mmce", minimize = TRUE, properties = c("classif", 
         "classif.multi", "req.pred", "req.truth"), fun = function (task, model, pred, 
             feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
             note = "Defined as: mean(response != truth)", 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(cp = structure(list(id = "cp", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0.05` = 0.05, `0.9` = 0.9), 
             cnames = NULL, allow.inf = FALSE, has.default = FALSE, default = NULL, trafo = NULL, 
             requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
             minsplit = structure(list(id = "minsplit", type = "discrete", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`1` = 1L, `2` = 2L), 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 = 1, tune.threshold = TRUE, tune.threshold.args = list(nsub = 2L), 
             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(resolution = 10L)), class = c("TuneControlGrid", 
         "TuneControl", "OptControl")), opt.path = structure(list(par.set = structure(list(
             pars = list(cp = structure(list(id = "cp", type = "discrete", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`0.05` = 0.05, `0.9` = 0.9), cnames = NULL, 
                 allow.inf = FALSE, has.default = FALSE, default = NULL, trafo = NULL, 
                 requires = NULL, tunable = TRUE, special.vals = list()), class = "Param"), 
                 minsplit = structure(list(id = "minsplit", type = "discrete", len = 1L, 
                     lower = NULL, upper = NULL, values = list(`1` = 1L, `2` = 2L), 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 = "mmce.test.mean", minimize = c(mmce.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: do.call(tuneThreshold, th.args)
  9: (function (pred, measure, task, model, nsub = 20L, control = list()) 
     {
         checkPrediction(pred, task.type = c("classif", "multilabel"), predict.type = "prob")
         td = pred$task.desc
         ttype = td$type
         measure = checkMeasures(measure, td)[[1L]]
         if (!missing(task)) 
             assertClass(task, classes = "SupervisedTask")
         if (!missing(model)) 
             assertClass(model, classes = "WrappedModel")
         assertList(control)
         probs = getPredictionProbabilities(pred)
         if (anyMissing(probs)) {
             return(list(th = NA, pred = pred, th.seq = numeric(0), perf = numeric(0)))
         }
         cls = pred$task.desc$class.levels
         k = length(cls)
         fitn = function(x) {
             if (ttype == "multilabel" || k > 2) 
                 names(x) = cls
             performance(setThreshold(pred, x), measure, task, model)
         }
         if (ttype == "multilabel" || k > 2L) {
             requirePackages("cmaes", why = "tuneThreshold", default.method = "load")
             start = rep(0.5, k)
             or = cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
             th = or$par/sum(or$par)
             names(th) = cls
             perf = or$val
         }
         else {
             or = optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, 
                 nsub = nsub)
             th = or[[1]]
             perf = or$objective
         }
         return(list(th = th, perf = perf))
     })(nsub = 2L, pred = structure(list(instance = structure(list(desc = structure(list(
         split = 0.666666666666667, id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(164L, 85L, 182L, 193L, 10L, 108L, 
     181L, 111L, 92L, 191L, 90L, 134L, 113L, 21L, 175L, 48L, 9L, 63L, 206L, 169L, 131L, 
     120L, 185L, 122L, 188L, 100L, 109L, 53L, 27L, 173L, 161L, 123L, 141L, 5L, 84L, 132L, 
     38L, 55L, 40L, 25L, 70L, 168L, 62L, 26L, 23L, 172L, 76L, 43L, 138L, 8L, 167L, 126L, 
     20L, 87L, 32L, 156L, 115L, 136L, 57L, 183L, 15L, 150L, 41L, 119L, 65L, 116L, 143L, 
     196L, 166L, 105L, 155L, 98L, 1L, 144L, 30L, 51L, 81L, 47L, 148L, 154L, 86L, 54L, 
     149L, 13L, 127L, 186L, 190L, 203L, 22L, 16L, 78L, 146L, 77L, 37L, 187L, 89L, 11L, 
     52L, 147L, 66L, 36L, 202L, 102L, 133L, 93L, 95L, 199L, 42L, 130L, 104L, 197L, 6L, 
     91L, 69L, 14L, 201L, 88L, 124L, 152L, 58L, 29L, 180L, 19L, 129L, 83L, 125L, 159L, 
     12L, 56L, 49L, 158L, 99L, 110L, 170L, 79L, 60L, 162L, 118L)), test.inds = list(c(3L, 
     145L, 75L, 94L, 121L, 135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 
     96L, 71L, 189L, 192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 
     142L, 17L, 59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 
     103L, 177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
     198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         predict.type = "prob", data = structure(list(id = c(3L, 145L, 75L, 94L, 121L, 
         135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 96L, 71L, 189L, 
         192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 142L, 17L, 
         59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 103L, 
         177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
         198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L), truth = structure(c(2L, 1L, 2L, 
         2L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 
         2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 
         2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 2L, 1L, 1L, 2L), .Label = c("M", "R"), class = "factor"), prob.M = c(0.873015873015873, 
         0.0681818181818182, 0, 0.230769230769231, 0.230769230769231, 0.0681818181818182, 
         0.0681818181818182, 0.873015873015873, 0.923076923076923, 0.923076923076923, 
         0.923076923076923, 0.0681818181818182, 0.873015873015873, 0.873015873015873, 
         0.0681818181818182, 0.0681818181818182, 0.0681818181818182, 0.0681818181818182, 
         0.873015873015873, 0.873015873015873, 0.0681818181818182, 0.873015873015873, 
         0.0681818181818182, 0.873015873015873, 0.873015873015873, 0.0681818181818182, 
         0.873015873015873, 0.873015873015873, 0.873015873015873, 0.0681818181818182, 
         0.230769230769231, 0.0681818181818182, 0.0681818181818182, 0.0681818181818182, 
         0.0681818181818182, 0.230769230769231, 0.873015873015873, 0.873015873015873, 
         0.0681818181818182, 0.0681818181818182, 0.873015873015873, 0.873015873015873, 
         0.873015873015873, 0, 0.230769230769231, 0.873015873015873, 0.873015873015873, 
         0.873015873015873, 0.230769230769231, 0.0681818181818182, 0.0681818181818182, 
         0.0681818181818182, 0.923076923076923, 0.873015873015873, 0.873015873015873, 
         0.873015873015873, 0.873015873015873, 0.230769230769231, 0.0681818181818182, 
         0.873015873015873, 0, 0.873015873015873, 0.873015873015873, 0.230769230769231, 
         0.873015873015873, 0.873015873015873, 0.873015873015873, 0.873015873015873, 0.873015873015873, 
         0.873015873015873), prob.R = c(0.126984126984127, 0.931818181818182, 1, 0.769230769230769, 
         0.769230769230769, 0.931818181818182, 0.931818181818182, 0.126984126984127, 0.0769230769230769, 
         0.0769230769230769, 0.0769230769230769, 0.931818181818182, 0.126984126984127, 
         0.126984126984127, 0.931818181818182, 0.931818181818182, 0.931818181818182, 0.931818181818182, 
         0.126984126984127, 0.126984126984127, 0.931818181818182, 0.126984126984127, 0.931818181818182, 
         0.126984126984127, 0.126984126984127, 0.931818181818182, 0.126984126984127, 0.126984126984127, 
         0.126984126984127, 0.931818181818182, 0.769230769230769, 0.931818181818182, 0.931818181818182, 
         0.931818181818182, 0.931818181818182, 0.769230769230769, 0.126984126984127, 0.126984126984127, 
         0.931818181818182, 0.931818181818182, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
         1, 0.769230769230769, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
         0.769230769230769, 0.931818181818182, 0.931818181818182, 0.931818181818182, 0.0769230769230769, 
         0.126984126984127, 0.126984126984127, 0.126984126984127, 0.126984126984127, 0.769230769230769, 
         0.931818181818182, 0.126984126984127, 1, 0.126984126984127, 0.126984126984127, 
         0.769230769230769, 0.126984126984127, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
         0.126984126984127, 0.126984126984127), response = structure(c(1L, 2L, 2L, 2L, 
         2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 
         1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 
         2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 
         1L, 1L, 1L, 1L, 1L, 1L), .Label = c("M", "R"), class = "factor"), iter = c(1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), set = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L), .Label = "test", class = "factor")), row.names = c(NA, -70L), class = "data.frame"), 
         threshold = c(M = 0.5, R = 0.5), 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 = structure(list(
                 c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), time = 0.0130000000000337), class = c("ResamplePrediction", 
     "PredictionClassif", "Prediction")), measure = structure(list(id = "mmce", minimize = TRUE, 
         properties = c("classif", "classif.multi", "req.pred", "req.truth"), fun = function (task, 
             model, pred, feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
         note = "Defined as: mean(response != truth)", 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"))
  10: optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, nsub = nsub)
  11: optimize(f = f, interval = interval, maximum = maximum, tol = tol)
  12: (function (arg) 
     f(arg, ...))(0.381966011250105)
  13: f(arg, ...)
  14: performance(setThreshold(pred, x), measure, task, model)
  15: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  16: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  17: FUN(X[[i]], ...)
  18: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  19: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 25. Error: tuning works with tuneThreshold and multiple measures (@test_base_
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneParams(lrn, binaryclass.task, resampling = rdesc, measures = list(mmce, auc), 
         par.set = ps, control = ctrl) at testthat/test_base_tuning.R:99
  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 = "classif.rpart", 
         type = "classif", package = "rpart", properties = c("twoclass", "multiclass", 
         "missings", "numerics", "factors", "ordered", "prob", "weights", "featimp"), 
         par.set = structure(list(pars = list(minsplit = structure(list(id = "minsplit", 
             type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), parms = structure(list(
             id = "parms", 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"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), par.vals = list(
             xval = 0L), predict.type = "prob", name = "Decision Tree", short.name = "rpart", 
         note = "`xval` has been set to `0` by default for speed.", callees = c("rpart", 
         "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines.", 
             parms = "Argument of: rpart::rpart\n\noptional parameters for the splitting function. Anova splitting has no parameters. Poisson splitting has a single parameter, the coefficient of variation of the prior distribution on the rates.  The default value is 1. Exponential splitting has the same parameter as Poisson. For classification splitting, the list can contain any of: the vector of prior probabilities (component prior), the loss matrix (component loss) or the splitting index (component split).  The priors must be positive and sum to 1.  The loss matrix must have zeros on the diagonal and positive off-diagonal elements.  The splitting index can be gini or information.  The default priors are proportional to the data counts, the losses default to 1, and the split defaults to gini."), 
         config = list(), fix.factors.prediction = FALSE), class = c("classif.rpart", 
     "RLearnerClassif", "RLearner", "Learner")), 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), resampling = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(60L, 164L, 85L, 182L, 192L, 10L, 
     107L, 180L, 111L, 91L, 190L, 90L, 133L, 112L, 20L, 174L, 48L, 9L, 63L, 181L, 168L, 
     130L, 120L, 184L, 121L, 187L, 100L, 108L, 53L, 27L, 172L, 160L, 122L, 140L, 5L, 83L, 
     131L, 38L, 55L, 40L, 24L, 70L, 69L, 61L, 26L, 23L, 171L, 76L, 43L, 137L, 8L, 167L, 
     125L, 19L, 87L, 32L, 194L, 114L, 135L, 56L, 99L, 14L, 57L, 169L, 118L, 65L, 116L, 
     115L, 195L, 62L, 105L, 154L, 97L, 1L, 64L, 30L, 51L, 81L, 46L, 15L, 153L, 206L, 201L, 
     148L, 13L, 54L, 185L, 109L, 202L, 21L, 16L, 77L, 145L, 161L, 37L, 22L, 88L, 11L, 
     52L, 149L, 143L, 36L, 110L, 101L, 132L, 92L, 94L, 139L, 42L, 129L, 103L, 196L, 6L, 
     199L, 68L, 147L, 104L, 159L, 126L, 151L, 58L, 28L, 179L, 155L, 128L, 82L, 124L, 158L, 
     12L, 170L, 49L, 166L, 106L, 176L, 39L, 78L, 208L, 75L)), test.inds = list(c(204L, 
     84L, 3L, 47L, 98L, 200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 
     142L, 50L, 152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 
     72L, 150L, 45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 
     186L, 183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
     188L, 141L, 59L, 162L, 173L, 31L, 89L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         measures = list(structure(list(id = "mmce", minimize = TRUE, properties = c("classif", 
         "classif.multi", "req.pred", "req.truth"), fun = function (task, model, pred, 
             feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
             note = "Defined as: mean(response != truth)", 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"), 
             structure(list(id = "auc", minimize = FALSE, properties = c("classif", "req.pred", 
             "req.truth", "req.prob"), fun = function (task, model, pred, feats, extra.args) 
             {
                 if (anyMissing(pred$data$response) || length(unique(pred$data$truth)) == 
                     1L) 
                     return(NA_real_)
                 measureAUC(getPredictionProbabilities(pred), pred$data$truth, pred$task.desc$negative, 
                     pred$task.desc$positive)
             }, extra.args = list(), best = 1, worst = 0, name = "Area under the curve", 
                 note = "Integral over the graph that results from computing fpr and tpr for many different thresholds.", 
                 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(cp = structure(list(id = "cp", type = "numeric", 
             len = 1L, lower = 0.1, upper = 0.2, 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 = c(1, 0), tune.threshold = TRUE, 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(cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0.1, 
                 upper = 0.2, 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 = c("mmce.test.mean", "auc.test.mean"
         ), minimize = c(mmce.test.mean = TRUE, auc.test.mean = FALSE), 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: do.call(tuneThreshold, th.args)
  9: (function (pred, measure, task, model, nsub = 20L, control = list()) 
     {
         checkPrediction(pred, task.type = c("classif", "multilabel"), predict.type = "prob")
         td = pred$task.desc
         ttype = td$type
         measure = checkMeasures(measure, td)[[1L]]
         if (!missing(task)) 
             assertClass(task, classes = "SupervisedTask")
         if (!missing(model)) 
             assertClass(model, classes = "WrappedModel")
         assertList(control)
         probs = getPredictionProbabilities(pred)
         if (anyMissing(probs)) {
             return(list(th = NA, pred = pred, th.seq = numeric(0), perf = numeric(0)))
         }
         cls = pred$task.desc$class.levels
         k = length(cls)
         fitn = function(x) {
             if (ttype == "multilabel" || k > 2) 
                 names(x) = cls
             performance(setThreshold(pred, x), measure, task, model)
         }
         if (ttype == "multilabel" || k > 2L) {
             requirePackages("cmaes", why = "tuneThreshold", default.method = "load")
             start = rep(0.5, k)
             or = cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
             th = or$par/sum(or$par)
             names(th) = cls
             perf = or$val
         }
         else {
             or = optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, 
                 nsub = nsub)
             th = or[[1]]
             perf = or$objective
         }
         return(list(th = th, perf = perf))
     })(pred = structure(list(instance = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(60L, 164L, 85L, 182L, 192L, 10L, 
     107L, 180L, 111L, 91L, 190L, 90L, 133L, 112L, 20L, 174L, 48L, 9L, 63L, 181L, 168L, 
     130L, 120L, 184L, 121L, 187L, 100L, 108L, 53L, 27L, 172L, 160L, 122L, 140L, 5L, 83L, 
     131L, 38L, 55L, 40L, 24L, 70L, 69L, 61L, 26L, 23L, 171L, 76L, 43L, 137L, 8L, 167L, 
     125L, 19L, 87L, 32L, 194L, 114L, 135L, 56L, 99L, 14L, 57L, 169L, 118L, 65L, 116L, 
     115L, 195L, 62L, 105L, 154L, 97L, 1L, 64L, 30L, 51L, 81L, 46L, 15L, 153L, 206L, 201L, 
     148L, 13L, 54L, 185L, 109L, 202L, 21L, 16L, 77L, 145L, 161L, 37L, 22L, 88L, 11L, 
     52L, 149L, 143L, 36L, 110L, 101L, 132L, 92L, 94L, 139L, 42L, 129L, 103L, 196L, 6L, 
     199L, 68L, 147L, 104L, 159L, 126L, 151L, 58L, 28L, 179L, 155L, 128L, 82L, 124L, 158L, 
     12L, 170L, 49L, 166L, 106L, 176L, 39L, 78L, 208L, 75L)), test.inds = list(c(204L, 
     84L, 3L, 47L, 98L, 200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 
     142L, 50L, 152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 
     72L, 150L, 45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 
     186L, 183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
     188L, 141L, 59L, 162L, 173L, 31L, 89L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         predict.type = "prob", data = structure(list(id = c(204L, 84L, 3L, 47L, 98L, 
         200L, 41L, 205L, 189L, 66L, 134L, 74L, 193L, 33L, 117L, 44L, 197L, 142L, 50L, 
         152L, 95L, 71L, 35L, 178L, 138L, 146L, 29L, 7L, 207L, 177L, 157L, 67L, 72L, 150L, 
         45L, 17L, 86L, 18L, 136L, 96L, 25L, 198L, 80L, 191L, 79L, 156L, 2L, 119L, 186L, 
         183L, 175L, 163L, 4L, 93L, 127L, 203L, 123L, 102L, 113L, 73L, 34L, 165L, 144L, 
         188L, 141L, 59L, 162L, 173L, 31L, 89L), truth = structure(c(1L, 2L, 2L, 2L, 1L, 
         1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 
         1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 
         1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
         2L, 1L, 1L, 2L, 2L), .Label = c("M", "R"), class = "factor"), prob.M = c(0.740740740740741, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 
         0.228070175438596, 0.740740740740741, 0.740740740740741, 0.228070175438596, 0.740740740740741, 
         0.228070175438596, 0.740740740740741, 0.228070175438596, 0.740740740740741, 0.740740740740741, 
         0.740740740740741, 0.228070175438596, 0.740740740740741, 0.228070175438596, 0.740740740740741, 
         0.228070175438596, 0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 
         0.740740740740741, 0.228070175438596, 0.740740740740741, 0.740740740740741, 0.740740740740741, 
         0.740740740740741, 0.228070175438596, 0.228070175438596, 0.228070175438596, 0.740740740740741, 
         0.228070175438596, 0.228070175438596, 0.228070175438596, 0.228070175438596, 0.228070175438596, 
         0.740740740740741, 0.228070175438596, 0.740740740740741, 0.228070175438596, 0.228070175438596, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.228070175438596, 0.740740740740741, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.740740740740741, 0.228070175438596, 
         0.740740740740741, 0.740740740740741, 0.740740740740741, 0.228070175438596), 
             prob.R = c(0.259259259259259, 0.259259259259259, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.259259259259259, 0.771929824561403, 0.259259259259259, 
             0.259259259259259, 0.771929824561403, 0.259259259259259, 0.771929824561403, 
             0.259259259259259, 0.771929824561403, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.771929824561403, 0.259259259259259, 0.771929824561403, 
             0.259259259259259, 0.771929824561403, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.771929824561403, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.259259259259259, 
             0.771929824561403, 0.771929824561403, 0.771929824561403, 0.259259259259259, 
             0.771929824561403, 0.771929824561403, 0.771929824561403, 0.771929824561403, 
             0.771929824561403, 0.259259259259259, 0.771929824561403, 0.259259259259259, 
             0.771929824561403, 0.771929824561403, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.771929824561403, 
             0.259259259259259, 0.259259259259259, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.771929824561403, 0.259259259259259, 0.259259259259259, 
             0.259259259259259, 0.771929824561403), response = structure(c(1L, 1L, 1L, 
             1L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 
             1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 
             1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 
             1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L), .Label = c("M", "R"), class = "factor"), 
             iter = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), set = structure(c(1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "test", class = "factor")), row.names = c(NA, 
         -70L), class = "data.frame"), threshold = c(M = 0.5, R = 0.5), 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), time = 0.0050000000000523), class = c("ResamplePrediction", 
     "PredictionClassif", "Prediction")), measure = structure(list(id = "mmce", minimize = TRUE, 
         properties = c("classif", "classif.multi", "req.pred", "req.truth"), fun = function (task, 
             model, pred, feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
         note = "Defined as: mean(response != truth)", 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"))
  10: optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, nsub = nsub)
  11: optimize(f = f, interval = interval, maximum = maximum, tol = tol)
  12: (function (arg) 
     f(arg, ...))(0.381966011250105)
  13: f(arg, ...)
  14: performance(setThreshold(pred, x), measure, task, model)
  15: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  16: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  17: FUN(X[[i]], ...)
  18: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  19: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ── 26. Error: tuning allows usage of budget (@test_base_tuning.R#128)  ─────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: tuneParams(lrn, sonar.task, resampling = rdesc, measures = list(mmce, auc), par.set = ps, 
         control = ctrl) at testthat/test_base_tuning.R:128
  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, xs, dobs = seq_along(xs), eols = NA_integer_, remove.nas = TRUE, 
         resample.fun = 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 = "classif.rpart", 
         type = "classif", package = "rpart", properties = c("twoclass", "multiclass", 
         "missings", "numerics", "factors", "ordered", "prob", "weights", "featimp"), 
         par.set = structure(list(pars = list(minsplit = structure(list(id = "minsplit", 
             type = "integer", len = 1L, lower = 1L, upper = Inf, values = NULL, cnames = NULL, 
             allow.inf = FALSE, has.default = TRUE, default = 20L, trafo = NULL, requires = NULL, 
             tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), minbucket = structure(list(id = "minbucket", type = "integer", len = 1L, 
             lower = 1L, upper = Inf, 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"
         )), cp = structure(list(id = "cp", type = "numeric", len = 1L, lower = 0, upper = 1, 
             values = NULL, cnames = NULL, allow.inf = FALSE, has.default = TRUE, default = 0.01, 
             trafo = NULL, requires = NULL, tunable = TRUE, special.vals = list(), when = "train"), class = c("LearnerParam", 
         "Param")), maxcompete = structure(list(id = "maxcompete", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 4L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), maxsurrogate = structure(list(id = "maxsurrogate", type = "integer", len = 1L, 
             lower = 0L, upper = Inf, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 5L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), usesurrogate = structure(list(id = "usesurrogate", type = "discrete", len = 1L, 
             lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L, `2` = 2L), 
             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")), surrogatestyle = structure(list(id = "surrogatestyle", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0` = 0L, `1` = 1L), 
             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")), maxdepth = structure(list(id = "maxdepth", type = "integer", len = 1L, 
             lower = 1L, upper = 30L, values = NULL, cnames = NULL, allow.inf = FALSE, 
             has.default = TRUE, default = 30L, trafo = NULL, requires = NULL, tunable = TRUE, 
             special.vals = list(), when = "train"), class = c("LearnerParam", "Param"
         )), xval = structure(list(id = "xval", 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 = FALSE, special.vals = list(), 
             when = "train"), class = c("LearnerParam", "Param")), parms = structure(list(
             id = "parms", 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"))), forbidden = NULL), class = c("LearnerParamSet", "ParamSet")), par.vals = list(
             xval = 0L), predict.type = "prob", name = "Decision Tree", short.name = "rpart", 
         note = "`xval` has been set to `0` by default for speed.", callees = c("rpart", 
         "rpart.control"), help.list = list(minsplit = "Argument of: rpart::rpart.control\n\nthe minimum number of observations that must exist in a node in order for a split to be attempted.", 
             minbucket = "Argument of: rpart::rpart.control\n\nthe minimum number of observations in any terminal <leaf> node. If only one of minbucket or minsplit is specified, the code either sets minsplit to minbucket*3 or minbucket to minsplit/3, as appropriate.", 
             cp = "Argument of: rpart::rpart.control\n\ncomplexity parameter.  Any split that does not decrease the overall lack of fit by a factor of cp is not attempted.  For instance, with anova splitting, this means that the overall R-squared must increase by cp at each step. The main role of this parameter is to save computing time by pruning off splits that are obviously not worthwhile. Essentially,the user informs the program that any split which does not improve the fit by cp will likely be pruned off by cross-validation, and that hence the program need not pursue it.", 
             maxcompete = "Argument of: rpart::rpart.control\n\nthe number of competitor splits retained in the output.  It is useful to know not just which split was chosen, but which variable came in second, third, etc.", 
             maxsurrogate = "Argument of: rpart::rpart.control\n\nthe number of surrogate splits retained in the output.  If this is set to zero the compute time will be reduced, since approximately half of the computational time (other than setup) is used in the search for surrogate splits.", 
             usesurrogate = "Argument of: rpart::rpart.control\n\nhow to use surrogates in the splitting process.  0 means display only; an observation with a missing value for the primary split rule is not sent further down the tree.  1 means use surrogates, in order, to split subjects missing the primary variable; if all surrogates are missing the observation is not split.  For value 2 ,if all surrogates are missing, then send the observation in the majority direction.  A value of 0 corresponds to the action of tree, and 2 to the recommendations of Breiman et.al (1984).", 
             xval = "Argument of: rpart::rpart.control\n\nnumber of cross-validations.", 
             surrogatestyle = "Argument of: rpart::rpart.control\n\ncontrols the selection of a best surrogate. If set to 0 (default) the program uses the total number of correct classification for a potential surrogate variable, if set to 1 it uses the percent correct, calculated over the non-missing values of the surrogate. The first option more severely penalizes covariates with a large number of missing values.", 
             maxdepth = "Argument of: rpart::rpart.control\n\nSet the maximum depth of any node of the final tree, with the root node counted as depth 0.  Values greater than  30 rpart will give nonsense results on 32-bit machines.", 
             parms = "Argument of: rpart::rpart\n\noptional parameters for the splitting function. Anova splitting has no parameters. Poisson splitting has a single parameter, the coefficient of variation of the prior distribution on the rates.  The default value is 1. Exponential splitting has the same parameter as Poisson. For classification splitting, the list can contain any of: the vector of prior probabilities (component prior), the loss matrix (component loss) or the splitting index (component split).  The priors must be positive and sum to 1.  The loss matrix must have zeros on the diagonal and positive off-diagonal elements.  The splitting index can be gini or information.  The default priors are proportional to the data counts, the losses default to 1, and the split defaults to gini."), 
         config = list(), fix.factors.prediction = FALSE), class = c("classif.rpart", 
     "RLearnerClassif", "RLearner", "Learner")), task = structure(list(type = "classif", 
         env = <environment>, weights = NULL, blocking = NULL, coordinates = NULL, task.desc = structure(list(
             id = "Sonar-example", 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc"))), class = c("ClassifTask", "SupervisedTask", 
     "Task")), resampling = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(164L, 85L, 182L, 193L, 10L, 108L, 
     181L, 111L, 92L, 191L, 90L, 134L, 113L, 21L, 175L, 48L, 9L, 63L, 206L, 169L, 131L, 
     120L, 185L, 122L, 188L, 100L, 109L, 53L, 27L, 173L, 161L, 123L, 141L, 5L, 84L, 132L, 
     38L, 55L, 40L, 25L, 70L, 168L, 62L, 26L, 23L, 172L, 76L, 43L, 138L, 8L, 167L, 126L, 
     20L, 87L, 32L, 156L, 115L, 136L, 57L, 183L, 15L, 150L, 41L, 119L, 65L, 116L, 143L, 
     196L, 166L, 105L, 155L, 98L, 1L, 144L, 30L, 51L, 81L, 47L, 148L, 154L, 86L, 54L, 
     149L, 13L, 127L, 186L, 190L, 203L, 22L, 16L, 78L, 146L, 77L, 37L, 187L, 89L, 11L, 
     52L, 147L, 66L, 36L, 202L, 102L, 133L, 93L, 95L, 199L, 42L, 130L, 104L, 197L, 6L, 
     91L, 69L, 14L, 201L, 88L, 124L, 152L, 58L, 29L, 180L, 19L, 129L, 83L, 125L, 159L, 
     12L, 56L, 49L, 158L, 99L, 110L, 170L, 79L, 60L, 162L, 118L)), test.inds = list(c(3L, 
     145L, 75L, 94L, 121L, 135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 
     96L, 71L, 189L, 192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 
     142L, 17L, 59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 
     103L, 177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
     198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         measures = list(structure(list(id = "mmce", minimize = TRUE, properties = c("classif", 
         "classif.multi", "req.pred", "req.truth"), fun = function (task, model, pred, 
             feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
             note = "Defined as: mean(response != truth)", 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"), 
             structure(list(id = "auc", minimize = FALSE, properties = c("classif", "req.pred", 
             "req.truth", "req.prob"), fun = function (task, model, pred, feats, extra.args) 
             {
                 if (anyMissing(pred$data$response) || length(unique(pred$data$truth)) == 
                     1L) 
                     return(NA_real_)
                 measureAUC(getPredictionProbabilities(pred), pred$data$truth, pred$task.desc$negative, 
                     pred$task.desc$positive)
             }, extra.args = list(), best = 1, worst = 0, name = "Area under the curve", 
                 note = "Integral over the graph that results from computing fpr and tpr for many different thresholds.", 
                 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(cp = structure(list(id = "cp", type = "discrete", 
             len = 1L, lower = NULL, upper = NULL, values = list(`0.1` = 0.1, `-1` = -1), 
             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 = c(1, 0), tune.threshold = TRUE, 
             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(resolution = 10L), budget = 2L), class = c("TuneControlGrid", 
         "TuneControl", "OptControl")), opt.path = structure(list(par.set = structure(list(
             pars = list(cp = structure(list(id = "cp", type = "discrete", len = 1L, lower = NULL, 
                 upper = NULL, values = list(`0.1` = 0.1, `-1` = -1), 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 = c("mmce.test.mean", "auc.test.mean"), minimize = c(mmce.test.mean = TRUE, 
             auc.test.mean = FALSE), 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: do.call(tuneThreshold, th.args)
  9: (function (pred, measure, task, model, nsub = 20L, control = list()) 
     {
         checkPrediction(pred, task.type = c("classif", "multilabel"), predict.type = "prob")
         td = pred$task.desc
         ttype = td$type
         measure = checkMeasures(measure, td)[[1L]]
         if (!missing(task)) 
             assertClass(task, classes = "SupervisedTask")
         if (!missing(model)) 
             assertClass(model, classes = "WrappedModel")
         assertList(control)
         probs = getPredictionProbabilities(pred)
         if (anyMissing(probs)) {
             return(list(th = NA, pred = pred, th.seq = numeric(0), perf = numeric(0)))
         }
         cls = pred$task.desc$class.levels
         k = length(cls)
         fitn = function(x) {
             if (ttype == "multilabel" || k > 2) 
                 names(x) = cls
             performance(setThreshold(pred, x), measure, task, model)
         }
         if (ttype == "multilabel" || k > 2L) {
             requirePackages("cmaes", why = "tuneThreshold", default.method = "load")
             start = rep(0.5, k)
             or = cmaes::cma_es(par = start, fn = fitn, lower = 0, upper = 1, control = control)
             th = or$par/sum(or$par)
             names(th) = cls
             perf = or$val
         }
         else {
             or = optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, 
                 nsub = nsub)
             th = or[[1]]
             perf = or$objective
         }
         return(list(th = th, perf = perf))
     })(pred = structure(list(instance = structure(list(desc = structure(list(split = 0.666666666666667, 
         id = "holdout", iters = 1L, predict = "test", stratify = FALSE), class = c("HoldoutDesc", 
     "ResampleDesc")), size = 208L, train.inds = list(c(164L, 85L, 182L, 193L, 10L, 108L, 
     181L, 111L, 92L, 191L, 90L, 134L, 113L, 21L, 175L, 48L, 9L, 63L, 206L, 169L, 131L, 
     120L, 185L, 122L, 188L, 100L, 109L, 53L, 27L, 173L, 161L, 123L, 141L, 5L, 84L, 132L, 
     38L, 55L, 40L, 25L, 70L, 168L, 62L, 26L, 23L, 172L, 76L, 43L, 138L, 8L, 167L, 126L, 
     20L, 87L, 32L, 156L, 115L, 136L, 57L, 183L, 15L, 150L, 41L, 119L, 65L, 116L, 143L, 
     196L, 166L, 105L, 155L, 98L, 1L, 144L, 30L, 51L, 81L, 47L, 148L, 154L, 86L, 54L, 
     149L, 13L, 127L, 186L, 190L, 203L, 22L, 16L, 78L, 146L, 77L, 37L, 187L, 89L, 11L, 
     52L, 147L, 66L, 36L, 202L, 102L, 133L, 93L, 95L, 199L, 42L, 130L, 104L, 197L, 6L, 
     91L, 69L, 14L, 201L, 88L, 124L, 152L, 58L, 29L, 180L, 19L, 129L, 83L, 125L, 159L, 
     12L, 56L, 49L, 158L, 99L, 110L, 170L, 79L, 60L, 162L, 118L)), test.inds = list(c(3L, 
     145L, 75L, 94L, 121L, 135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 
     96L, 71L, 189L, 192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 
     142L, 17L, 59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 
     103L, 177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
     198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L)), group = structure(integer(0), .Label = character(0), class = "factor")), class = "ResampleInstance"), 
         predict.type = "prob", data = structure(list(id = c(3L, 145L, 75L, 94L, 121L, 
         135L, 74L, 194L, 112L, 33L, 107L, 64L, 117L, 44L, 97L, 153L, 96L, 71L, 189L, 
         192L, 24L, 139L, 67L, 35L, 160L, 7L, 106L, 208L, 68L, 73L, 50L, 45L, 142L, 17L, 
         59L, 176L, 179L, 140L, 163L, 72L, 165L, 200L, 195L, 80L, 178L, 28L, 2L, 103L, 
         177L, 4L, 61L, 39L, 128L, 184L, 82L, 137L, 114L, 46L, 18L, 171L, 151L, 207L, 
         198L, 205L, 101L, 157L, 31L, 204L, 174L, 34L), truth = structure(c(2L, 1L, 2L, 
         2L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 
         2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 
         2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 2L, 1L, 1L, 2L), .Label = c("M", "R"), class = "factor"), prob.M = c(0.873015873015873, 
         0.241935483870968, 0.241935483870968, 0.230769230769231, 0.230769230769231, 0.241935483870968, 
         0.241935483870968, 0.873015873015873, 0.241935483870968, 0.241935483870968, 0.241935483870968, 
         0.241935483870968, 0.873015873015873, 0.873015873015873, 0.241935483870968, 0.241935483870968, 
         0.241935483870968, 0.241935483870968, 0.873015873015873, 0.873015873015873, 0.241935483870968, 
         0.873015873015873, 0.241935483870968, 0.873015873015873, 0.873015873015873, 0.241935483870968, 
         0.873015873015873, 0.873015873015873, 0.873015873015873, 0.241935483870968, 0.230769230769231, 
         0.241935483870968, 0.241935483870968, 0.241935483870968, 0.241935483870968, 0.230769230769231, 
         0.873015873015873, 0.873015873015873, 0.241935483870968, 0.241935483870968, 0.873015873015873, 
         0.873015873015873, 0.873015873015873, 0.241935483870968, 0.230769230769231, 0.873015873015873, 
         0.873015873015873, 0.873015873015873, 0.230769230769231, 0.241935483870968, 0.241935483870968, 
         0.241935483870968, 0.241935483870968, 0.873015873015873, 0.873015873015873, 0.873015873015873, 
         0.873015873015873, 0.230769230769231, 0.241935483870968, 0.873015873015873, 0.241935483870968, 
         0.873015873015873, 0.873015873015873, 0.230769230769231, 0.873015873015873, 0.873015873015873, 
         0.873015873015873, 0.873015873015873, 0.873015873015873, 0.873015873015873), 
             prob.R = c(0.126984126984127, 0.758064516129032, 0.758064516129032, 0.769230769230769, 
             0.769230769230769, 0.758064516129032, 0.758064516129032, 0.126984126984127, 
             0.758064516129032, 0.758064516129032, 0.758064516129032, 0.758064516129032, 
             0.126984126984127, 0.126984126984127, 0.758064516129032, 0.758064516129032, 
             0.758064516129032, 0.758064516129032, 0.126984126984127, 0.126984126984127, 
             0.758064516129032, 0.126984126984127, 0.758064516129032, 0.126984126984127, 
             0.126984126984127, 0.758064516129032, 0.126984126984127, 0.126984126984127, 
             0.126984126984127, 0.758064516129032, 0.769230769230769, 0.758064516129032, 
             0.758064516129032, 0.758064516129032, 0.758064516129032, 0.769230769230769, 
             0.126984126984127, 0.126984126984127, 0.758064516129032, 0.758064516129032, 
             0.126984126984127, 0.126984126984127, 0.126984126984127, 0.758064516129032, 
             0.769230769230769, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
             0.769230769230769, 0.758064516129032, 0.758064516129032, 0.758064516129032, 
             0.758064516129032, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
             0.126984126984127, 0.769230769230769, 0.758064516129032, 0.126984126984127, 
             0.758064516129032, 0.126984126984127, 0.126984126984127, 0.769230769230769, 
             0.126984126984127, 0.126984126984127, 0.126984126984127, 0.126984126984127, 
             0.126984126984127, 0.126984126984127), response = structure(c(1L, 2L, 2L, 
             2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 
             2L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 
             1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 
             2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("M", "R"), class = "factor"), 
             iter = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), set = structure(c(1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
             1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "test", class = "factor")), row.names = c(NA, 
         -70L), class = "data.frame"), threshold = c(M = 0.5, R = 0.5), task.desc = structure(list(
             id = "Sonar-example", 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 = structure(list(c("M", "R")), .Names = ""), class = "table")), class = c("ClassifTaskDesc", 
         "SupervisedTaskDesc", "TaskDesc")), time = 0.0120000000000005), class = c("ResamplePrediction", 
     "PredictionClassif", "Prediction")), measure = structure(list(id = "mmce", minimize = TRUE, 
         properties = c("classif", "classif.multi", "req.pred", "req.truth"), fun = function (task, 
             model, pred, feats, extra.args) 
         {
             measureMMCE(pred$data$truth, pred$data$response)
         }, extra.args = list(), best = 0, worst = 1, name = "Mean misclassification error", 
         note = "Defined as: mean(response != truth)", 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"))
  10: optimizeSubInts(f = fitn, lower = 0, upper = 1, maximum = !measure$minimize, nsub = nsub)
  11: optimize(f = f, interval = interval, maximum = maximum, tol = tol)
  12: (function (arg) 
     f(arg, ...))(0.381966011250105)
  13: f(arg, ...)
  14: performance(setThreshold(pred, x), measure, task, model)
  15: vnapply(measures, doPerformanceIteration, pred = pred, task = task, model = model, 
         td = NULL, feats = feats)
  16: vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_real_, USE.NAMES = use.names)
  17: FUN(X[[i]], ...)
  18: as.data.table(pred$data)[, fun(.SD), by = "iter"]
  19: `[.data.table`(as.data.table(pred$data), , fun(.SD), by = "iter")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 3380 SKIPPED: 0 FAILED: 26
  1. Error: TuneWrapper uses tune.threshold (@test_base_TuneWrapper.R#64) 
  2. Error: TuneWrapper works with nested sampling and threshold tuning, cf. issue 242 (@test_base_TuneWrapper.R#109) 
  3. Error: calculateConfusionMatrix elements are consistent with implemented measures (@test_base_calculateConfusionMatrix.R#87) 
  4. Error: convertBMRToRankMatrix (@test_base_convertBMRToRankMatrix.R#14) 
  5. Error: generateCalibrationData (@test_base_generateCalibration.R#8) 
  6. Error: plotFilterValues (@test_base_generateFilterValuesData.R#69) 
  7. Error: 2+ hyperparams (@test_base_generateHyperParsEffect.R#285) 
  8. Error: generatePartialDependenceData (@test_base_generatePartialDependence.R#8) 
  9. Error: generateThreshVsPerfData (@test_base_generateThreshVsPerf.R#25) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted