During construction of a tuning instance, I would expect that TuningInstanceSingleCrit and TuningInstanceMultiCrit accept an object of class TuningSpace as input for search_space.
library(mlr3verse)
#> Loading required package: mlr3
library(mlr3tuningspaces)
#> Loading required package: mlr3tuning
#> Loading required package: paradox
task = tsk("boston_housing")
learner = lrn("regr.ranger", splitrule = "extratrees")
tuning_space = mlr3tuningspaces::lts("regr.ranger.default")
measure = msr("regr.mse")
resampling = rsmp("holdout")
terminator = trm("evals", n_evals = 5)
# This does not work
instance = TuningInstanceSingleCrit$new(
task = task,
learner = learner,
measure = measure,
resampling = resampling,
search_space = tuning_space,
terminator = terminator
)
#> Error in assert_param_set(search_space): Assertion on 'param_set' failed: Must inherit from class 'ParamSet', but has classes 'TuningSpace','R6'.
During construction of a tuning instance, I would expect that
TuningInstanceSingleCrit
andTuningInstanceMultiCrit
accept an object of classTuningSpace
as input forsearch_space
.Created on 2021-12-26 by the reprex package (v2.0.1)