https://github.com/berndbischl/mlr
Raw File
Tip revision: 3d7e0aa91936e82cf108aff3c46b19e3f953eefd authored by pat-s on 10 January 2020, 22:23:02 UTC
Bump version to 2.17.0.9000
Tip revision: 3d7e0aa
tuneGrid.R
# tunes with grid search, all params are supported as we use generateGridDesign
tuneGrid = function(learner, task, resampling, measures, par.set, control, opt.path, show.info, resample.fun) {
  des = generateGridDesign(par.set, resolution = control$extra.args$resolution, trafo = FALSE)
  if (!is.null(control$budget) && (nrow(des) != control$budget)) {
    stopf("The given budget (%i) does not fit to the size of the grid (%i).", control$budget, nrow(des))
  }
  xs = dfRowsToList(des, par.set)
  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)
  makeTuneResultFromOptPath(learner, par.set, measures, resampling, control, opt.path)
}
back to top