Description Usage Arguments Value Examples
View source: R/HyperoptWrapper.R
Fuses an mlr base learner with mlrHyperopt tuning.
Creates a learner object, which can be used like any other learner object.
If the train function is called on it, hyperopt
is invoked to select an optimal set of hyperparameter values.
Finally, a model is fitted on the complete training data with these optimal hyperparameters and returned.
1 2 3 4 5 6 | makeHyperoptWrapper(
learner,
par.config = NULL,
hyper.control = NULL,
show.info = getMlrOptions()$show.info
)
|
learner |
[ |
par.config |
[ |
hyper.control |
[ |
show.info |
[ |
[Learner
].
1 2 3 4 5 6 7 8 9 | task = makeClassifTask(data = iris, target = "Species")
lrn = makeLearner("classif.svm")
lrn = makeHyperoptWrapper(lrn)
mod = train(lrn, task)
print(getTuneResult(mod))
# nested resampling for evaluation
# we also extract tuned hyper pars in each iteration
r = resample(lrn, task, cv3, extract = getTuneResult)
getNestedTuneResultsX(r)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.