AutoMLClassif: AutoMLClassif

Description Construction Super class Methods Examples

Description

Class for Automated Regression in mlr3automl. Subclass of AutoMLBase

Construction

Objects should be created using the AutoML interface function.

1
2
classification_model = AutoML(classification_task, learner_list, learner_timeout, resampling,
                              measure, runtime, terminator, preprocessing, portfolio)

Super class

mlr3automl::AutoMLBase -> AutoMLClassif

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
AutoMLClassif$new(
  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)
TaskClassif to be solved.

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")
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.
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.

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.

Returns

AutoMLClassif


Method clone()

The objects of this class are cloneable with this method.

Usage
AutoMLClassif$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

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

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

## End(Not run)

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