AutoML: Interface function for mlr3automl

Description Usage Arguments Value Examples

View source: R/AutoML.R

Description

Creates an instance of AutoMLClassif or AutoMLRegr.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
AutoML(
  task,
  learner_list = NULL,
  learner_timeout = NULL,
  resampling = NULL,
  measure = NULL,
  runtime = Inf,
  terminator = NULL,
  preprocessing = NULL,
  portfolio = TRUE,
  additional_params = NULL,
  custom_trafo = NULL
)

Arguments

task

(Task)
Contains the task to be solved. Currently TaskClassif and TaskRegr are supported.

learner_list

(list() | character())
List of names from mlr_learners. Can be used to customize the learners to be tuned over.
Default learners for classification: c("classif.ranger", "classif.xgboost", "classif.liblinear")
Default learners for regression: c("regr.ranger", "regr.xgboost", "regr.svm", "regr.liblinear", "regr.cv_glmnet")
Might break mlr3automl if a user-provided learner is incompatible with the provided task.

learner_timeout

(integer(1))
Budget (in seconds) for a single parameter evaluation during model training.
If this budget is exceeded, the evaluation is stopped and performance measured with the fallback LearnerClassifFeatureless or LearnerRegrFeatureless.
When this is NULL (default), the learner timeout defaults to runtime / 5.

resampling

(Resampling)
Contains the resampling method to be used for hyper-parameter optimization. Defaults to ResamplingHoldout.

measure

(Measure)
Contains the performance measure, for which we optimize during training.
Defaults to Accuracy for classification and RMSE for regression.

runtime

(integer(1))
Number of seconds for which to run the optimization. Does not include training time of the final model.
Defaults to Inf, letting Hyperband terminate the tuning.

terminator

(Terminator)
Contains an optional additional termination criterion for model tuning.
Note that the Hyperband tuner might stop training before the budget is exhausted. TerminatorRunTime should not be used, use the separate runtime parameter instead.
Defaults to TerminatorNone, letting Hyperband terminate the tuning.

preprocessing

(character(1) | Graph)
Type of preprocessing to be used. Possible values are :

  • "none": No preprocessing at all

  • "stability": pipeline_robustify is used to guarantee stability of the learners in the pipeline

  • "full": Adds additional preprocessing operators for Imputation, Impact Encoding and PCA.
    The choice of preprocessing operators is optimised during tuning.

Alternatively, a Graph object can be used to specify a custom preprocessing pipeline.

portfolio

(logical(1))
mlr3automl tries out a fixed portfolio of known good learners prior to tuning.
The portfolio parameter disables trying these portfolio learners.

additional_params

(ParamSet)
Additional parameter space to tune over, e.g. for custom learners / preprocessing.

custom_trafo

(function(x, param_set))
Trafo function to be applied in addition to existing transformations. Can be used to transform additional_params.

Value

(AutoMLClassif | AutoMLRegr)
Returned class depends on the type of task.

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(mlr3)
library(mlr3automl)

model = AutoML(tsk("iris"))
model$train()

## End(Not run)

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