| Title: | Automated Machine Learning for 'mlr3' |
|---|---|
| Description: | Flexible automated machine learning (AutoML) system for the 'mlr3' ecosystem. Automatically selects a suitable machine learning algorithm and tunes its hyperparameters for a given task. Constructs preprocessing pipelines with multiple parallel branches using 'mlr3pipelines' and jointly optimizes them together with the learners using 'mlr3tuning'. The optimization is driven by asynchronous decentralized Bayesian optimization by Egele et al. (2023) <doi:10.1109/e-Science58273.2023.10254839>. |
| Authors: | Marc Becker [cre, aut, cph] (ORCID: <https://orcid.org/0000-0002-8115-0400>), Damir Pulatov [aut], Baisu Zhou [aut], Lona Koers [aut] |
| Maintainer: | Marc Becker <[email protected]> |
| License: | LGPL-3 |
| Version: | 0.1.0.9000 |
| Built: | 2026-09-23 17:41:15 UTC |
| Source: | https://github.com/mlr-org/mlr3automl |
Flexible automated machine learning (AutoML) system for the 'mlr3' ecosystem. Automatically selects a suitable machine learning algorithm and tunes its hyperparameters for a given task. Constructs preprocessing pipelines with multiple parallel branches using 'mlr3pipelines' and jointly optimizes them together with the learners using 'mlr3tuning'. The optimization is driven by asynchronous decentralized Bayesian optimization by Egele et al. (2023) doi:10.1109/e-Science58273.2023.10254839.
Maintainer: Marc Becker [email protected] (ORCID) [copyright holder]
Authors:
Marc Becker [email protected] (ORCID) [copyright holder]
Damir Pulatov [email protected]
Baisu Zhou [email protected]
Lona Koers [email protected]
Useful links:
Report bugs at https://github.com/mlr-org/mlr3automl/issues
This class is the base class for all autos.
Object of class R6::R6Class and Auto.
id(character(1)).
properties(character()).
task_types(character()).
packages(character()).
devices(character()).
n_cpu(integer(1))
Number of CPUs a single training of the learner uses.
n_gpu(integer(1))
Number of GPUs a single training of the learner uses.
Auto$new()Creates a new instance of this R6 class.
Auto$new( id, properties = character(0), task_types = character(0), packages = character(0), devices = character(0), n_cpu = 1L, n_gpu = 0L )
id(character(1)).
properties(character()).
task_types(character()).
packages(character()).
devices(character()).
n_cpu(integer(1)).
n_gpu(integer(1)).
Auto$check()Check if the auto is compatible with the task.
Auto$check(task, memory_limit = Inf, large_data_set = FALSE, devices)
task(mlr3::Task).
memory_limit(integer(1)).
large_data_set(logical(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
Auto$graph()Create the graph for the auto.
Auto$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
Auto$early_stopping_rounds()Estimate the number of early stopping rounds (the patience) for a learner.
budget is the maximum number of training rounds (boosting iterations or epochs) the learner may use.
The patience is capped well below the budget, otherwise early stopping and validation-based internal tuning
can never trigger and the learner always trains for the full budget.
Auto$early_stopping_rounds(task, budget = Inf)
task(mlr3::Task).
budget(integer(1))
Maximum number of training rounds (boosting iterations or epochs) the learner may use.
Auto$estimate_memory()Estimate the memory for the auto.
The estimate is the host memory in MB, so learners that allocate on the gpu return -Inf.
Auto$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
Auto$finalize_model()Prepare the graph learner for the final model fit. Called after tuning to undo tuning-only setup (e.g., timeout callbacks).
Auto$finalize_model(graph_learner)
graph_learnerAuto$design_default()Default hyperparameters for the learner.
Auto$design_default(task)
task(mlr3::Task).
Auto$design_set()Get the initial hyperparameter set for the learner.
Auto$design_set(task, measure, size)
task(mlr3::Task).
measuresize(integer(1)).
Auto$search_space()Get the search space for the learner.
Auto$search_space(task)
task(mlr3::Task).
Auto$clone()The objects of this class are cloneable with this method.
Auto$clone(deep = FALSE)
deepWhether to make a deep clone.
Catboost auto.
Object of class R6::R6Class and AutoCatboost.
Auto -> AutoCatboost
AutoCatboost$new()Creates a new instance of this R6 class.
AutoCatboost$new(id = "catboost")
id(character(1))
Identifier for the new instance.
AutoCatboost$graph()Create the graph for the auto.
AutoCatboost$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoCatboost$estimate_memory()Estimate the memory for the auto.
AutoCatboost$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoCatboost$internal_measure()Get the internal measure for the auto.
AutoCatboost$internal_measure(measure, task)
measuretask(mlr3::Task).
AutoCatboost$clone()The objects of this class are cloneable with this method.
AutoCatboost$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("catboost")auto("catboost")
Extra Trees auto.
Object of class R6::R6Class and AutoExtraTrees.
Auto -> AutoExtraTrees
AutoExtraTrees$new()Creates a new instance of this R6 class.
AutoExtraTrees$new(id = "extra_trees")
id(character(1))
Identifier for the new instance.
AutoExtraTrees$graph()Create the graph for the auto.
AutoExtraTrees$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(numeric(1)).
timeout(numeric(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoExtraTrees$estimate_memory()Estimate the memory for the auto.
AutoExtraTrees$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoExtraTrees$clone()The objects of this class are cloneable with this method.
AutoExtraTrees$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("extra_trees")auto("extra_trees")
Fastai auto.
Object of class R6::R6Class and AutoFastai.
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual
environment automatically.
Point the RETICULATE_PYTHON environment variable to a Python installation that has the required packages
installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
Auto -> AutoFastai
AutoFastai$new()Creates a new instance of this R6 class.
AutoFastai$new(id = "fastai")
id(character(1))
Identifier for the new instance.
AutoFastai$check()Check if the auto is compatible with the task.
AutoFastai$check( task, memory_limit = Inf, large_data_set = FALSE, devices = "cpu" )
task(mlr3::Task).
memory_limit(integer(1)).
large_data_set(logical(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoFastai$graph()Create the graph for the auto.
AutoFastai$graph( task, measure, n_threads, timeout, devices, isolate_python = TRUE )
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
isolate_python(logical(1))
Whether to train and predict the learner in a fresh callr session.
Isolation is required when mlr3torch is loaded in the same process,
because the bundled libtorch versions of the R and Python torch packages are incompatible.
Default is TRUE.
AutoFastai$estimate_memory()Estimate the memory for the auto.
AutoFastai$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoFastai$internal_measure()Get the internal measure for the auto.
AutoFastai$internal_measure(measure, task)
measuretask(mlr3::Task).
AutoFastai$clone()The objects of this class are cloneable with this method.
AutoFastai$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("fastai")auto("fastai")
FTTransformer auto.
Object of class R6::R6Class and AutoFTTransformer.
Auto -> AutoFTTransformer
AutoFTTransformer$new()Creates a new instance of this R6 class.
AutoFTTransformer$new(id = "ft_transformer")
id(character(1))
Identifier for the new instance.
AutoFTTransformer$graph()Create the graph for the auto.
AutoFTTransformer$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoFTTransformer$estimate_memory()Estimate the memory for the auto.
AutoFTTransformer$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoFTTransformer$clone()The objects of this class are cloneable with this method.
AutoFTTransformer$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("ft_transformer")auto("ft_transformer")
Glmnet auto.
Object of class R6::R6Class and AutoGlmnet.
Auto -> AutoGlmnet
AutoGlmnet$new()Creates a new instance of this R6 class.
AutoGlmnet$new(id = "glmnet")
id(character(1))
Identifier for the new instance.
AutoGlmnet$graph()Create the graph for the auto.
AutoGlmnet$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoGlmnet$clone()The objects of this class are cloneable with this method.
AutoGlmnet$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("glmnet")auto("glmnet")
Kknn auto.
Object of class R6::R6Class and AutoKKNN.
Auto -> AutoKKNN
AutoKKNN$new()Creates a new instance of this R6 class.
AutoKKNN$new(id = "kknn")
id(character(1))
Identifier for the new instance.
AutoKKNN$graph()Create the graph for the auto.
AutoKKNN$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoKKNN$search_space()Get the search space for the auto.
AutoKKNN$search_space(task)
task(mlr3::Task).
AutoKKNN$clone()The objects of this class are cloneable with this method.
AutoKKNN$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("kknn")auto("kknn")
Lda auto.
Object of class R6::R6Class and AutoLda.
Auto -> AutoLda
AutoLda$new()Creates a new instance of this R6 class.
AutoLda$new(id = "lda")
id(character(1))
Identifier for the new instance.
AutoLda$graph()Create the graph for the auto.
AutoLda$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoLda$clone()The objects of this class are cloneable with this method.
AutoLda$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("lda")auto("lda")
Lightgbm auto.
Object of class R6::R6Class and AutoLightGBM.
Auto -> AutoLightGBM
AutoLightGBM$new()Creates a new instance of this R6 class.
AutoLightGBM$new(id = "lightgbm")
id(character(1))
Identifier for the new instance.
AutoLightGBM$graph()Create the graph for the auto.
AutoLightGBM$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoLightGBM$finalize_model()Prepare the graph learner for the final model fit.
AutoLightGBM$finalize_model(graph_learner)
graph_learnerAutoLightGBM$estimate_memory()Estimate the memory for the auto.
AutoLightGBM$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoLightGBM$internal_measure()Get the internal measure for the auto.
AutoLightGBM$internal_measure(measure, task)
measuretask(mlr3::Task).
AutoLightGBM$clone()The objects of this class are cloneable with this method.
AutoLightGBM$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("lightgbm")auto("lightgbm")
Mlp auto.
Object of class R6::R6Class and AutoMLP.
Auto -> AutoMLP
AutoMLP$new()Creates a new instance of this R6 class.
AutoMLP$new(id = "mlp")
id(character(1))
Identifier for the new instance.
AutoMLP$graph()Create the graph for the auto.
AutoMLP$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoMLP$estimate_memory()Estimate the memory for the auto.
AutoMLP$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoMLP$clone()The objects of this class are cloneable with this method.
AutoMLP$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("mlp")auto("mlp")
Ranger auto.
Object of class R6::R6Class and AutoRanger.
Auto -> AutoRanger
AutoRanger$new()Creates a new instance of this R6 class.
AutoRanger$new(id = "ranger")
id(character(1))
Identifier for the new instance.
AutoRanger$graph()Create the graph for the auto.
AutoRanger$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoRanger$estimate_memory()Estimate the memory for the auto.
AutoRanger$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoRanger$clone()The objects of this class are cloneable with this method.
AutoRanger$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("ranger")auto("ranger")
ResNet auto.
Object of class R6::R6Class and AutoResNet.
Auto -> AutoResNet
AutoResNet$new()Creates a new instance of this R6 class.
AutoResNet$new(id = "resnet")
id(character(1))
Identifier for the new instance.
AutoResNet$graph()Create the graph for the auto.
AutoResNet$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoResNet$estimate_memory()Estimate the memory for the auto.
AutoResNet$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoResNet$clone()The objects of this class are cloneable with this method.
AutoResNet$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("resnet")auto("resnet")
Svm auto.
Object of class R6::R6Class and AutoSVM.
Auto -> AutoSVM
AutoSVM$new()Creates a new instance of this R6 class.
AutoSVM$new(id = "svm")
id(character(1))
Identifier for the new instance.
AutoSVM$graph()Create the graph for the auto.
AutoSVM$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoSVM$design_default()Default hyperparameters for the learner.
AutoSVM$design_default(task)
task(mlr3::Task).
AutoSVM$clone()The objects of this class are cloneable with this method.
AutoSVM$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("svm")auto("svm")
Tabfm auto.
Tabfm predicts in context, so every prediction runs the backbone over the training rows once per estimator.
This is too slow to be useful on the CPU, so the auto is registered for "cuda" only and
Auto$check() removes it from the search space whenever devices does not include "cuda".
Construct it with AutoTabFM$new(devices = c("cpu", "cuda")) and re-register it in mlr_auto to run it
on the CPU anyway.
Object of class R6::R6Class and AutoTabFM.
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual
environment automatically.
Point the RETICULATE_PYTHON environment variable to a Python installation that has the required packages
installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
Auto -> AutoTabFM
AutoTabFM$new()Creates a new instance of this R6 class.
AutoTabFM$new(id = "tabfm", devices = "cuda")
id(character(1))
Identifier for the new instance.
devices(character())
Devices the auto is allowed to run on.
Defaults to "cuda" only, because tabfm is too slow to be useful on the CPU.
AutoTabFM$check()Check if the auto is compatible with the task.
AutoTabFM$check( task, memory_limit = Inf, large_data_set = FALSE, devices = "cpu" )
task(mlr3::Task).
memory_limit(integer(1)).
large_data_set(logical(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoTabFM$graph()Create the graph for the auto.
AutoTabFM$graph( task, measure, n_threads, timeout, devices, isolate_python = TRUE )
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
isolate_python(logical(1))
Whether to train and predict the learner in a fresh callr session.
Isolation is required when mlr3torch is loaded in the same process,
because the bundled libtorch versions of the R and Python torch packages are incompatible.
Default is TRUE.
AutoTabFM$estimate_memory()Estimate the memory for the auto.
AutoTabFM$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoTabFM$design_default()Default hyperparameters for the learner.
AutoTabFM$design_default(task)
task(mlr3::Task).
AutoTabFM$search_space()Get the search space for the auto.
AutoTabFM$search_space(task)
task(mlr3::Task).
AutoTabFM$clone()The objects of this class are cloneable with this method.
AutoTabFM$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("tabfm")auto("tabfm")
Tabpfn auto.
Object of class R6::R6Class and AutoTabPFN.
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual
environment automatically.
Point the RETICULATE_PYTHON environment variable to a Python installation that has the required packages
installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
Auto -> AutoTabPFN
AutoTabPFN$new()Creates a new instance of this R6 class.
AutoTabPFN$new(id = "tabpfn")
id(character(1))
Identifier for the new instance.
AutoTabPFN$check()Check if the auto is compatible with the task.
AutoTabPFN$check( task, memory_limit = Inf, large_data_set = FALSE, devices = "cpu" )
task(mlr3::Task).
memory_limit(integer(1)).
large_data_set(logical(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoTabPFN$graph()Create the graph for the auto.
AutoTabPFN$graph( task, measure, n_threads, timeout, devices, isolate_python = TRUE )
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
isolate_python(logical(1))
Whether to train and predict the learner in a fresh callr session.
Isolation is required when mlr3torch is loaded in the same process,
because the bundled libtorch versions of the R and Python torch packages are incompatible.
Default is TRUE.
AutoTabPFN$estimate_memory()Estimate the memory for the auto.
AutoTabPFN$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoTabPFN$design_default()Default hyperparameters for the learner.
AutoTabPFN$design_default(task)
task(mlr3::Task).
AutoTabPFN$search_space()Get the search space for the auto.
AutoTabPFN$search_space(task)
task(mlr3::Task).
AutoTabPFN$clone()The objects of this class are cloneable with this method.
AutoTabPFN$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("tabpfn")auto("tabpfn")
Xgboost auto.
Object of class R6::R6Class and AutoXgboost.
Auto -> AutoXgboost
AutoXgboost$new()Creates a new instance of this R6 class.
AutoXgboost$new(id = "xgboost")
id(character(1))
Identifier for the new instance.
AutoXgboost$graph()Create the graph for the auto.
AutoXgboost$graph(task, measure, n_threads, timeout, devices)
task(mlr3::Task).
measuren_threads(integer(1)).
timeout(integer(1)).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoXgboost$finalize_model()Prepare the graph learner for the final model fit.
AutoXgboost$finalize_model(graph_learner)
graph_learnerAutoXgboost$estimate_memory()Estimate the memory for the auto.
AutoXgboost$estimate_memory(task, devices = "cpu")
task(mlr3::Task).
devices(character())
Devices to use.
Allowed values are "cpu" and "cuda".
Default is "cpu".
AutoXgboost$internal_measure()Get the internal measure for the auto.
AutoXgboost$internal_measure(measure, task)
measuretask(mlr3::Task).
AutoXgboost$clone()The objects of this class are cloneable with this method.
AutoXgboost$clone(deep = FALSE)
deepWhether to make a deep clone.
auto("xgboost")auto("xgboost")
Creates a conda environment and installs the packages required by the Python learners.
Installs the dependencies of the fastai auto learner, the tabfm auto learner, and the tabpfn auto learner.
The learners share a single environment, so one RETICULATE_PYTHON covers all of them.
install_python_learners( learners = c("fastai", "tabfm", "tabpfn"), envname = file.path(tools::R_user_dir("mlr3automl", which = "data"), "mlr3automl-python"), python_version = "3.12" )install_python_learners( learners = c("fastai", "tabfm", "tabpfn"), envname = file.path(tools::R_user_dir("mlr3automl", which = "data"), "mlr3automl-python"), python_version = "3.12" )
learners |
( |
envname |
( |
python_version |
( |
The environment is created under tools::R_user_dir() by default.
The environment can exceed 10GB with torch/CUDA dependencies.
The function downloads and installs Python packages and must therefore be called explicitly by the user.
It is never called by any other function of the package.
Invisibly returns the path to the Python binary in the environment.
# The example is wrapped in \dontrun{} because it cannot be executed during checks. # It downloads and installs conda, a Python interpreter, and several Python packages, # which requires network access, several GB of disk space, and a few minutes of runtime. ## Not run: python = install_python_learners() Sys.setenv(RETICULATE_PYTHON = python) ## End(Not run)# The example is wrapped in \dontrun{} because it cannot be executed during checks. # It downloads and installs conda, a Python interpreter, and several Python packages, # which requires network access, several GB of disk space, and a few minutes of runtime. ## Not run: python = install_python_learners() Sys.setenv(RETICULATE_PYTHON = python) ## End(Not run)
The LearnerClassifAuto is an automated machine learning (AutoML) system for classification tasks. It combines preprocessing, a switch between multiple learners, and hyperparameter tuning to find the best model for the given task.
Object of class R6::R6Class and LearnerClassifAuto.
Set options(bbotk.debug = TRUE) to run the tuning in the main session.
Set encapsulate_learner = FALSE to remove encapsulation of the learner.
Set encapsulate_mbo = FALSE to catch no errors in mbo.
(integer(1))
Timeout for training and predicting with a single learner.
(integer(1))
Number of threads used for training a single learner.
(named integer())
Number of CPUs a single training of a learner uses, named by learner id, e.g. c(xgboost = 1).
Overrides the default of the learner.
Must be at least 1 because the worker always runs on the CPU.
Currently informational only; the number of threads is controlled by n_threads.
(named integer())
Number of GPUs a single training of a learner uses, named by learner id, e.g. c(xgboost = 1).
Overrides the default of the learner.
Can only be 0 or 1 for now.
The torch learners, TabPFN, TabFM, and fastai default to 1; all other learners default to 0.
Only effective when "cuda" is part of devices; otherwise every learner is trained on the CPU.
When the requirements are mixed and the daemons of the mirai compute profiles
"mlr3automl_cpu" and "mlr3automl_gpu" are set up with rush::rush_plan(), the search space is
partitioned into a cpu and a gpu subspace which are tuned with mlr3mbo::TunerADBOSubspaces.
The workers of a profile only ever propose and evaluate points of the subspace of that profile,
so the number of workers per subspace is the number of workers of its profile.
Otherwise the cpu and gpu learners are tuned in a single search space with mlr3mbo::TunerAsyncMbo.
mirai::daemons(7, .compute = "mlr3automl_cpu") mirai::daemons(1, .compute = "mlr3automl_gpu") rush::rush_plan(profiles = c(mlr3automl_cpu = 7, mlr3automl_gpu = 1))
(integer(1))
Memory limit for training a single learner in MB.
The limit is shared across the parallel workers, i.e. divided by the number of workers.
(character())
Devices to use for model training.
Possible values are "cpu" and "cuda".
If "cuda", learners with a n_gpu requirement of 1 are trained on a GPU,
while the remaining learners stay on the CPU.
(integer(1))
Threshold for the data set size (number of rows times number of columns) above
which large-data rules apply.
Beyond this threshold the number of parallel workers is reduced to a quarter, rounded up, and each
remaining worker is given proportionally more threads and memory.
When the workers are distributed over mirai compute profiles, the number of workers of every
profile is reduced, but every profile keeps at least one worker.
The "mlr3automl_gpu" profile is exempt because its number of workers is fixed by the number of GPUs.
It keeps its workers, threads, and memory limit so that the gpu learners do not claim the CPU cores and
the memory that are freed on the cpu profiles.
(integer(1))
Threshold value for the data set size (rows) from which special rules apply.
(mlr3::Resampling)
Resampling strategy to use for model training on small data sets.
(logical(1))
Whether to use the default design of the learner.
(integer(1))
Number of points to use for the initial design set.
(integer(1))
Size of the random, sobol or lhs initial design.
(character(1))
Type of the initial design used for mbo.
Possible values are "lhs", "sobol", "random".
"lhs" uses a Latin Hypercube Sampling design.
"sobol" uses a Sobol sequence design.
"random" uses a random design.
(numeric(1))
Fraction of the budget to use for the initial design.
When the search space is partitioned into a cpu and a gpu subspace, the remaining points of both
designs are dropped, because every compute profile has its own queue.
(mlr3::Resampling)
Resampling strategy used for tuning.
(bbotk::Terminator)
Terminator criterion for tuning.
(mlr3::Measure)
Measure used for tuning.
(mlr3tuning::CallbackAsyncTuning)
Callbacks used for tuning.
(logical(1))
Whether to store the benchmark result.
(logical(1))
Whether to store the models.
(logical(1))
Whether to encapsulate the learner.
Change to FALSE to debug.
(logical(1))
Whether to encapsulate the tuning.
Change to FALSE to debug.
(logical(1))
Whether to check if the learners are compatible with the task.
Change to FALSE to debug.
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual
environment automatically.
Point the RETICULATE_PYTHON environment variable to a Python installation that has the required packages
installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto
LearnerClassifAuto$new()Creates a new instance of this R6 class.
LearnerClassifAuto$new(id = "classif.auto", learner_ids, rush = NULL)
id(character(1))
Identifier for the new instance.
learner_ids(character())
Learner that should be used.
rushrush::Rush
Rush instance.
LearnerClassifAuto$clone()The objects of this class are cloneable with this method.
LearnerClassifAuto$clone(deep = FALSE)
deepWhether to make a deep clone.
packages = c( "mlr3extralearners", "catboost", "ranger", "callr", "mlr3torch", "glmnet", "kknn", "MASS", "lightgbm", "e1071", "xgboost" ) if (mlr3misc::require_namespaces(packages, quietly = TRUE)) { learner = lrn("classif.auto") learner }packages = c( "mlr3extralearners", "catboost", "ranger", "callr", "mlr3torch", "glmnet", "kknn", "MASS", "lightgbm", "e1071", "xgboost" ) if (mlr3misc::require_namespaces(packages, quietly = TRUE)) { learner = lrn("classif.auto") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoCatboost.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoCatboost
LearnerClassifAutoCatboost$new()Creates a new instance of this R6 class.
LearnerClassifAutoCatboost$new(id = "classif.auto_catboost", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoCatboost$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoCatboost$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "catboost"), quietly = TRUE)) { learner = lrn("classif.auto_catboost") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "catboost"), quietly = TRUE)) { learner = lrn("classif.auto_catboost") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoFastai.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoFastai
LearnerClassifAutoFastai$new()Creates a new instance of this R6 class.
LearnerClassifAutoFastai$new(id = "classif.auto_fastai", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoFastai$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoFastai$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_fastai") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_fastai") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoFTTransformer.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoFTTransformer
LearnerClassifAutoFTTransformer$new()Creates a new instance of this R6 class.
LearnerClassifAutoFTTransformer$new( id = "classif.auto_ft_transformer", rush = NULL )
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoFTTransformer$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoFTTransformer$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_ft_transformer") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_ft_transformer") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoGlmnet.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoGlmnet
LearnerClassifAutoGlmnet$new()Creates a new instance of this R6 class.
LearnerClassifAutoGlmnet$new(id = "classif.auto_glmnet", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoGlmnet$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoGlmnet$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("glmnet", quietly = TRUE)) { learner = lrn("classif.auto_glmnet") learner }if (mlr3misc::require_namespaces("glmnet", quietly = TRUE)) { learner = lrn("classif.auto_glmnet") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoKKNN.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoKKNN
LearnerClassifAutoKKNN$new()Creates a new instance of this R6 class.
LearnerClassifAutoKKNN$new(id = "classif.auto_kknn", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoKKNN$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoKKNN$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("kknn", quietly = TRUE)) { learner = lrn("classif.auto_kknn") learner }if (mlr3misc::require_namespaces("kknn", quietly = TRUE)) { learner = lrn("classif.auto_kknn") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoLightGBM.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoLightGBM
LearnerClassifAutoLightGBM$new()Creates a new instance of this R6 class.
LearnerClassifAutoLightGBM$new(id = "classif.auto_lightgbm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoLightGBM$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoLightGBM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "lightgbm"), quietly = TRUE)) { learner = lrn("classif.auto_lightgbm") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "lightgbm"), quietly = TRUE)) { learner = lrn("classif.auto_lightgbm") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoMLP.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoMLP
LearnerClassifAutoMLP$new()Creates a new instance of this R6 class.
LearnerClassifAutoMLP$new(id = "classif.auto_mlp", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoMLP$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoMLP$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_mlp") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_mlp") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoRanger.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoRanger
LearnerClassifAutoRanger$new()Creates a new instance of this R6 class.
LearnerClassifAutoRanger$new(id = "classif.auto_ranger", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoRanger$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoRanger$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("ranger", quietly = TRUE)) { learner = lrn("classif.auto_ranger") learner }if (mlr3misc::require_namespaces("ranger", quietly = TRUE)) { learner = lrn("classif.auto_ranger") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoResNet.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoResNet
LearnerClassifAutoResNet$new()Creates a new instance of this R6 class.
LearnerClassifAutoResNet$new(id = "classif.auto_resnet", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoResNet$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoResNet$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_resnet") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("classif.auto_resnet") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoSVM.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoSVM
LearnerClassifAutoSVM$new()Creates a new instance of this R6 class.
LearnerClassifAutoSVM$new(id = "classif.auto_svm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoSVM$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoSVM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("e1071", quietly = TRUE)) { learner = lrn("classif.auto_svm") learner }if (mlr3misc::require_namespaces("e1071", quietly = TRUE)) { learner = lrn("classif.auto_svm") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoTabFM.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoTabFM
LearnerClassifAutoTabFM$new()Creates a new instance of this R6 class.
LearnerClassifAutoTabFM$new(id = "classif.auto_tabfm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoTabFM$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoTabFM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_tabfm") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_tabfm") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoTabPFN.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoTabPFN
LearnerClassifAutoTabPFN$new()Creates a new instance of this R6 class.
LearnerClassifAutoTabPFN$new(id = "classif.auto_tabpfn", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoTabPFN$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoTabPFN$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_tabpfn") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("classif.auto_tabpfn") learner }
Classification auto learner.
Object of class R6::R6Class and LearnerClassifAutoXgboost.
mlr3::Learner -> LearnerAuto -> LearnerClassifAuto -> LearnerClassifAutoXgboost
LearnerClassifAutoXgboost$new()Creates a new instance of this R6 class.
LearnerClassifAutoXgboost$new(id = "classif.auto_xgboost", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerClassifAutoXgboost$clone()The objects of this class are cloneable with this method.
LearnerClassifAutoXgboost$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("xgboost", quietly = TRUE)) { learner = lrn("classif.auto_xgboost") learner }if (mlr3misc::require_namespaces("xgboost", quietly = TRUE)) { learner = lrn("classif.auto_xgboost") learner }
A subclass of mlr3extralearners::LearnerClassifFastai that isolates the Python environment in a callr session.
Object of class R6::R6Class and LearnerClassifFastaiIsolated.
mlr3::Learner -> mlr3::LearnerClassif -> mlr3extralearners::LearnerClassifFastai -> LearnerClassifFastaiIsolated
isolate_python(logical(1))
Whether to run .train() and .predict() in a fresh callr session. Set by
AutoFastai$graph(); only FALSE when the run's learners never load mlr3torch.
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerClassif$predict_newdata_fast()mlr3extralearners::LearnerClassifFastai$marshal()mlr3extralearners::LearnerClassifFastai$unmarshal()LearnerClassifFastaiIsolated$new()Creates a new instance of this R6 class.
LearnerClassifFastaiIsolated$new()
LearnerClassifFastaiIsolated$clone()The objects of this class are cloneable with this method.
LearnerClassifFastaiIsolated$clone(deep = FALSE)
deepWhether to make a deep clone.
A subclass of mlr3extralearners::LearnerClassifTabFM that isolates the Python environment in a callr session.
Object of class R6::R6Class and LearnerClassifTabFMIsolated.
mlr3::Learner -> mlr3::LearnerClassif -> mlr3extralearners::LearnerClassifTabFM -> LearnerClassifTabFMIsolated
isolate_python(logical(1))
Whether to run .train() and .predict() in a fresh callr session. Set by
AutoTabFM$graph(); only FALSE when the run's learners never load mlr3torch.
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerClassif$predict_newdata_fast()mlr3extralearners::LearnerClassifTabFM$marshal()mlr3extralearners::LearnerClassifTabFM$unmarshal()LearnerClassifTabFMIsolated$new()Creates a new instance of this R6 class.
LearnerClassifTabFMIsolated$new()
LearnerClassifTabFMIsolated$clone()The objects of this class are cloneable with this method.
LearnerClassifTabFMIsolated$clone(deep = FALSE)
deepWhether to make a deep clone.
A subclass of mlr3extralearners::LearnerClassifTabPFN that isolates the Python environment in a callr session.
Object of class R6::R6Class and LearnerClassifTabPFNIsolated.
mlr3::Learner -> mlr3::LearnerClassif -> mlr3extralearners::LearnerClassifTabPFN -> LearnerClassifTabPFNIsolated
isolate_python(logical(1))
Whether to run .train() and .predict() in a fresh callr session. Set by
AutoTabPFN$graph(); only FALSE when the run's learners never load mlr3torch.
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerClassif$predict_newdata_fast()mlr3extralearners::LearnerClassifTabPFN$marshal()mlr3extralearners::LearnerClassifTabPFN$unmarshal()LearnerClassifTabPFNIsolated$new()Creates a new instance of this R6 class.
LearnerClassifTabPFNIsolated$new()
LearnerClassifTabPFNIsolated$clone()The objects of this class are cloneable with this method.
LearnerClassifTabPFNIsolated$clone(deep = FALSE)
deepWhether to make a deep clone.
The LearnerRegrAuto is an automated machine learning (AutoML) system for regression tasks. It combines preprocessing, a switch between multiple learners, and hyperparameter tuning to find the best model for the given task.
Object of class R6::R6Class and LearnerRegrAuto.
Set options(bbotk.debug = TRUE) to run the tuning in the main session.
Set encapsulate_learner = FALSE to remove encapsulation of the learner.
Set encapsulate_mbo = FALSE to catch no errors in mbo.
(integer(1))
Timeout for training and predicting with a single learner.
(integer(1))
Number of threads used for training a single learner.
(named integer())
Number of CPUs a single training of a learner uses, named by learner id, e.g. c(xgboost = 1).
Overrides the default of the learner.
Must be at least 1 because the worker always runs on the CPU.
Currently informational only; the number of threads is controlled by n_threads.
(named integer())
Number of GPUs a single training of a learner uses, named by learner id, e.g. c(xgboost = 1).
Overrides the default of the learner.
Can only be 0 or 1 for now.
The torch learners, TabPFN, TabFM, and fastai default to 1; all other learners default to 0.
Only effective when "cuda" is part of devices; otherwise every learner is trained on the CPU.
When the requirements are mixed and the daemons of the mirai compute profiles
"mlr3automl_cpu" and "mlr3automl_gpu" are set up with rush::rush_plan(), the search space is
partitioned into a cpu and a gpu subspace which are tuned with mlr3mbo::TunerADBOSubspaces.
The workers of a profile only ever propose and evaluate points of the subspace of that profile,
so the number of workers per subspace is the number of workers of its profile.
Otherwise the cpu and gpu learners are tuned in a single search space with mlr3mbo::TunerAsyncMbo.
mirai::daemons(7, .compute = "mlr3automl_cpu") mirai::daemons(1, .compute = "mlr3automl_gpu") rush::rush_plan(profiles = c(mlr3automl_cpu = 7, mlr3automl_gpu = 1))
(integer(1))
Memory limit for training a single learner in MB.
The limit is shared across the parallel workers, i.e. divided by the number of workers.
(character())
Devices to use for model training.
Possible values are "cpu" and "cuda".
If "cuda", learners with a n_gpu requirement of 1 are trained on a GPU,
while the remaining learners stay on the CPU.
(integer(1))
Threshold for the data set size (number of rows times number of columns) above
which large-data rules apply.
Beyond this threshold the number of parallel workers is reduced to a quarter, rounded up, and each
remaining worker is given proportionally more threads and memory.
When the workers are distributed over mirai compute profiles, the number of workers of every
profile is reduced, but every profile keeps at least one worker.
The "mlr3automl_gpu" profile is exempt because its number of workers is fixed by the number of GPUs.
It keeps its workers, threads, and memory limit so that the gpu learners do not claim the CPU cores and
the memory that are freed on the cpu profiles.
(integer(1))
Threshold value for the data set size (rows) from which special rules apply.
(mlr3::Resampling)
Resampling strategy to use for model training on small data sets.
(logical(1))
Whether to use the default design of the learner.
(integer(1))
Number of points to use for the initial design set.
(integer(1))
Size of the random, sobol or lhs initial design.
(character(1))
Type of the initial design used for mbo.
Possible values are "lhs", "sobol", "random".
"lhs" uses a Latin Hypercube Sampling design.
"sobol" uses a Sobol sequence design.
"random" uses a random design.
(numeric(1))
Fraction of the budget to use for the initial design.
When the search space is partitioned into a cpu and a gpu subspace, the remaining points of both
designs are dropped, because every compute profile has its own queue.
(mlr3::Resampling)
Resampling strategy used for tuning.
(bbotk::Terminator)
Terminator criterion for tuning.
(mlr3::Measure)
Measure used for tuning.
(mlr3tuning::CallbackAsyncTuning)
Callbacks used for tuning.
(logical(1))
Whether to store the benchmark result.
(logical(1))
Whether to store the models.
(logical(1))
Whether to encapsulate the learner.
Change to FALSE to debug.
(logical(1))
Whether to encapsulate the tuning.
Change to FALSE to debug.
(logical(1))
Whether to check if the learners are compatible with the task.
Change to FALSE to debug.
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual
environment automatically.
Point the RETICULATE_PYTHON environment variable to a Python installation that has the required packages
installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto
LearnerRegrAuto$new()Creates a new instance of this R6 class.
LearnerRegrAuto$new(id = "regr.auto", learner_ids, rush = NULL)
id(character(1))
Identifier for the new instance.
learner_ids(character())
Learner that should be used.
rushrush::Rush
Rush instance.
LearnerRegrAuto$clone()The objects of this class are cloneable with this method.
LearnerRegrAuto$clone(deep = FALSE)
deepWhether to make a deep clone.
packages = c( "mlr3extralearners", "catboost", "ranger", "callr", "mlr3torch", "glmnet", "kknn", "MASS", "lightgbm", "e1071", "xgboost" ) if (mlr3misc::require_namespaces(packages, quietly = TRUE)) { learner = lrn("regr.auto") learner }packages = c( "mlr3extralearners", "catboost", "ranger", "callr", "mlr3torch", "glmnet", "kknn", "MASS", "lightgbm", "e1071", "xgboost" ) if (mlr3misc::require_namespaces(packages, quietly = TRUE)) { learner = lrn("regr.auto") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoCatboost.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoCatboost
LearnerRegrAutoCatboost$new()Creates a new instance of this R6 class.
LearnerRegrAutoCatboost$new(id = "regr.auto_catboost", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoCatboost$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoCatboost$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "catboost"), quietly = TRUE)) { learner = lrn("regr.auto_catboost") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "catboost"), quietly = TRUE)) { learner = lrn("regr.auto_catboost") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoFTTransformer.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoFTTransformer
LearnerRegrAutoFTTransformer$new()Creates a new instance of this R6 class.
LearnerRegrAutoFTTransformer$new(id = "regr.auto_ft_transformer", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoFTTransformer$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoFTTransformer$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_ft_transformer") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_ft_transformer") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoGlmnet.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoGlmnet
LearnerRegrAutoGlmnet$new()Creates a new instance of this R6 class.
LearnerRegrAutoGlmnet$new(id = "regr.auto_glmnet", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoGlmnet$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoGlmnet$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("glmnet", quietly = TRUE)) { learner = lrn("regr.auto_glmnet") learner }if (mlr3misc::require_namespaces("glmnet", quietly = TRUE)) { learner = lrn("regr.auto_glmnet") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoKKNN.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoKKNN
LearnerRegrAutoKKNN$new()Creates a new instance of this R6 class.
LearnerRegrAutoKKNN$new(id = "regr.auto_kknn", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoKKNN$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoKKNN$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("kknn", quietly = TRUE)) { learner = lrn("regr.auto_kknn") learner }if (mlr3misc::require_namespaces("kknn", quietly = TRUE)) { learner = lrn("regr.auto_kknn") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoLightGBM.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoLightGBM
LearnerRegrAutoLightGBM$new()Creates a new instance of this R6 class.
LearnerRegrAutoLightGBM$new(id = "regr.auto_lightgbm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoLightGBM$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoLightGBM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "lightgbm"), quietly = TRUE)) { learner = lrn("regr.auto_lightgbm") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "lightgbm"), quietly = TRUE)) { learner = lrn("regr.auto_lightgbm") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoMLP.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoMLP
LearnerRegrAutoMLP$new()Creates a new instance of this R6 class.
LearnerRegrAutoMLP$new(id = "regr.auto_mlp", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoMLP$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoMLP$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_mlp") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_mlp") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoRanger.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoRanger
LearnerRegrAutoRanger$new()Creates a new instance of this R6 class.
LearnerRegrAutoRanger$new(id = "regr.auto_ranger", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoRanger$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoRanger$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("ranger", quietly = TRUE)) { learner = lrn("regr.auto_ranger") learner }if (mlr3misc::require_namespaces("ranger", quietly = TRUE)) { learner = lrn("regr.auto_ranger") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoResNet.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoResNet
LearnerRegrAutoResNet$new()Creates a new instance of this R6 class.
LearnerRegrAutoResNet$new(id = "regr.auto_resnet", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoResNet$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoResNet$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_resnet") learner }if (mlr3misc::require_namespaces("mlr3torch", quietly = TRUE)) { learner = lrn("regr.auto_resnet") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoSVM.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoSVM
LearnerRegrAutoSVM$new()Creates a new instance of this R6 class.
LearnerRegrAutoSVM$new(id = "regr.auto_svm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoSVM$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoSVM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("e1071", quietly = TRUE)) { learner = lrn("regr.auto_svm") learner }if (mlr3misc::require_namespaces("e1071", quietly = TRUE)) { learner = lrn("regr.auto_svm") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoTabFM.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoTabFM
LearnerRegrAutoTabFM$new()Creates a new instance of this R6 class.
LearnerRegrAutoTabFM$new(id = "regr.auto_tabfm", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoTabFM$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoTabFM$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("regr.auto_tabfm") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("regr.auto_tabfm") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoTabPFN.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoTabPFN
LearnerRegrAutoTabPFN$new()Creates a new instance of this R6 class.
LearnerRegrAutoTabPFN$new(id = "regr.auto_tabpfn", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoTabPFN$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoTabPFN$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("regr.auto_tabpfn") learner }if (mlr3misc::require_namespaces(c("mlr3extralearners", "callr"), quietly = TRUE)) { learner = lrn("regr.auto_tabpfn") learner }
Regression auto learner.
Object of class R6::R6Class and LearnerRegrAutoXgboost.
mlr3::Learner -> LearnerAuto -> LearnerRegrAuto -> LearnerRegrAutoXgboost
LearnerRegrAutoXgboost$new()Creates a new instance of this R6 class.
LearnerRegrAutoXgboost$new(id = "regr.auto_xgboost", rush = NULL)
id(character(1))
Identifier for the new instance.
rushrush::Rush
Rush instance.
LearnerRegrAutoXgboost$clone()The objects of this class are cloneable with this method.
LearnerRegrAutoXgboost$clone(deep = FALSE)
deepWhether to make a deep clone.
if (mlr3misc::require_namespaces("xgboost", quietly = TRUE)) { learner = lrn("regr.auto_xgboost") learner }if (mlr3misc::require_namespaces("xgboost", quietly = TRUE)) { learner = lrn("regr.auto_xgboost") learner }
A subclass of mlr3extralearners::LearnerRegrTabFM that isolates the Python environment in a callr session.
Object of class R6::R6Class and LearnerRegrTabFMIsolated.
mlr3::Learner -> mlr3::LearnerRegr -> mlr3extralearners::LearnerRegrTabFM -> LearnerRegrTabFMIsolated
isolate_python(logical(1))
Whether to run .train() and .predict() in a fresh callr session. Set by
AutoTabFM$graph(); only FALSE when the run's learners never load mlr3torch.
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerRegr$predict_newdata_fast()mlr3extralearners::LearnerRegrTabFM$marshal()mlr3extralearners::LearnerRegrTabFM$unmarshal()LearnerRegrTabFMIsolated$new()Creates a new instance of this R6 class.
LearnerRegrTabFMIsolated$new()
LearnerRegrTabFMIsolated$clone()The objects of this class are cloneable with this method.
LearnerRegrTabFMIsolated$clone(deep = FALSE)
deepWhether to make a deep clone.
A subclass of mlr3extralearners::LearnerRegrTabPFN that isolates the Python environment in a callr session.
Object of class R6::R6Class and LearnerRegrTabPFNIsolated.
mlr3::Learner -> mlr3::LearnerRegr -> mlr3extralearners::LearnerRegrTabPFN -> LearnerRegrTabPFNIsolated
isolate_python(logical(1))
Whether to run .train() and .predict() in a fresh callr session. Set by
AutoTabPFN$graph(); only FALSE when the run's learners never load mlr3torch.
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerRegr$predict_newdata_fast()mlr3extralearners::LearnerRegrTabPFN$marshal()mlr3extralearners::LearnerRegrTabPFN$unmarshal()LearnerRegrTabPFNIsolated$new()Creates a new instance of this R6 class.
LearnerRegrTabPFNIsolated$new()
LearnerRegrTabPFNIsolated$clone()The objects of this class are cloneable with this method.
LearnerRegrTabPFNIsolated$clone(deep = FALSE)
deepWhether to make a deep clone.
A dictionary of Auto objects.
Sugar function to retrieve Auto objects from mlr_auto.
mlr_auto auto(.key, ...)mlr_auto auto(.key, ...)
.key |
( |
... |
(named |
auto("catboost")auto("catboost")
This mlr3misc::Callback starts a persistent mirai daemon on each rush worker that is reused for the
"mirai" encapsulation of the tuned learners.
Reusing a single daemon avoids the overhead of starting a new daemon for every learner evaluation.
The daemon is started when the worker begins and its liveness is checked before every evaluation.
If the daemon has died, it is restarted.
n_daemons :: integer(1)
Number of daemons to start on each worker.
Defaults to 1.
clbk("mlr3automl.encapsulation_daemon", n_daemons = 1)clbk("mlr3automl.encapsulation_daemon", n_daemons = 1)
This mlr3misc::Callback drops the remaining tasks of the initial design from the queue when a
configurable fraction (initial_design_fraction) of the runtime limit is reached.
The initial_design_fraction is set to 0.25 by default.
clbk("mlr3automl.initial_design_runtime", initial_design_fraction = 0.5)clbk("mlr3automl.initial_design_runtime", initial_design_fraction = 0.5)