mlr3tuning is the hyperparameter optimization package of the
mlr3 ecosystem. It features highly configurable
search spaces via the paradox
package and finds optimal hyperparameter configurations for any mlr3
learner. mlr3tuning works
with several optimization algorithms e.g. Random Search, Iterated
Racing, Bayesian Optimization (in
mlr3mbo) and Hyperband (in
mlr3hyperband). Moreover, it
can
automatically
optimize learners and estimate the performance of optimized models with
nested
resampling.
The package is built on the optimization framework
bbotk.
Extension packages
mlr3tuning is extended by the following packages.
mlr3tuningspaces is a
collection of search spaces from scientific articles for commonly used
learners.
mlr3hyperband adds the
Hyperband and Successive Halving algorithm.
mlr3tuning
Package website: release | dev
mlr3tuning is the hyperparameter optimization package of the mlr3 ecosystem. It features highly configurable search spaces via the paradox package and finds optimal hyperparameter configurations for any mlr3 learner. mlr3tuning works with several optimization algorithms e.g. Random Search, Iterated Racing, Bayesian Optimization (in mlr3mbo) and Hyperband (in mlr3hyperband). Moreover, it can automatically optimize learners and estimate the performance of optimized models with nested resampling. The package is built on the optimization framework bbotk.
Extension packages
mlr3tuning is extended by the following packages.
Resources
There are several sections about hyperparameter optimization in the mlr3book.
The gallery features a collection of case studies and demos about optimization.
The cheatsheet summarizes the most important functions of mlr3tuning.
Installation
Install the last release from CRAN:
Install the development version from GitHub:
Examples
We optimize the
costandgammahyperparameters of a support vector machine on the Sonar data set.We construct a tuning instance with the
ti()function. The tuning instance describes the tuning problem.We select a simple grid search as the optimization algorithm.
To start the tuning, we simply pass the tuning instance to the tuner.
The tuner returns the best hyperparameter configuration and the corresponding measured performance.
The archive contains all evaluated hyperparameter configurations.
The mlr3viz package visualizes tuning results.
We fit a final model with optimized hyperparameters to make predictions on new data.