The package mlr3tuningspaces ships with some predefined tuning spaces for hyperparameter optimization. See the respective manual page for the article from which they were extracted.
Example Usage
Load a tuning space for the classification tree learner from the Bischl et al. (2021) article.
library(mlr3verse)# load learner and set search spacelearner =lts(lrn("classif.rpart"))# retrieve tasktask =tsk("pima")# load tuner and set batch sizetuner =tnr("random_search", batch_size =10)# hyperparameter tuning on the pima data setinstance =tune(method =tnr("grid_search", resolution =5, batch_size =25),task = task,learner = learner,resampling =rsmp("holdout"),measure =msr("classif.ce"),)# best performing hyperparameter configurationinstance$result
Bischl, Bernd, Martin Binder, Michel Lang, Tobias Pielok, Jakob Richter, Stefan Coors, Janek Thomas, et al. 2021. “Hyperparameter Optimization: Foundations, Algorithms, BestPractices and OpenChallenges.”arXiv:2107.05847 [Cs, Stat], July. http://arxiv.org/abs/2107.05847.