create_autotuner: Create an AutoTuner with a single line of code

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Small utility function, which creates an AutoTuner for a given learner.
Uses the same interface as the AutoTuner, but provides defaults for all arguments.
Parameter spaces are identical to the ones used in mlr3automl.

Usage

1
2
3
4
5
6
7
8
create_autotuner(
  learner = lrn("classif.xgboost"),
  resampling = rsmp("cv", folds = 10),
  measure = NULL,
  terminator = trm("run_time", secs = 60),
  tuner = tnr("random_search"),
  num_effective_vars = NULL
)

Arguments

learner

(character(1) | Learner)
Learner inside the AutoTuner. Parameter sets are predefined for ranger, xgboost, liblinear, svm and cv_glmnet learners for both prediction and regression. Other learners will obtain empty parameter sets.

resampling

(Resampling)

measure

(Measure)

terminator

(Terminator)

tuner

(Tuner | TunerHyperband)
Tuner. Hyperband is supported by creating a GraphLearner with PipeOpSubsample.

num_effective_vars


Integer giving the number of features in the dataset. Only required for parameter transformation of mtry in Random Forest (we are tuning over num_effective_vars^0.1 to num_effective_vars^0.9)

Value

AutoTuner

Examples

1
2
library(mlr3automl)
my_autotuner = create_autotuner(lrn("classif.svm"))

a-hanf/mlr3automl documentation built on Feb. 21, 2022, 1:06 a.m.