In a HyperControl object, is there a way to change either measure or resampling (or both) and leave other settings at their defaults?
This code results in error:
makeHyperControl(resampling = cv3, measures = kappa)
## Error in makeHyperControl(resampling = cv3, measures = kappa) :
## Assertion on 'mlr.control' failed: Must have class 'TuneControl', but has class 'NULL'.
And manual modification of fields result in unexpected outcome:
set.seed(1)
# Create the object:
h_ctrl <- generateHyperControl(task = sonar.task, learner = "classif.ranger")
# Manually modify the fields:
h_ctrl <- makeHyperControl(h_ctrl$mlr.control,
resampling = cv3,
measures = kappa,
par.config = h_ctrl$par.config)
# Tune
h_params <- hyperopt(sonar.task,
learner = "classif.ranger",
hyper.control = h_ctrl,
show.info = FALSE)
h_params
## Op. pars: mtry=1; min.node.size=2
## kappa.test.mean=-0.64
It seems that it was searched for the minimum kappa value