|
| 1 | +#' @title Asynchronous Decentralized Bayesian Optimization |
| 2 | +#' @name mlr_tuners_adbo |
| 3 | +#' |
| 4 | +#' @description |
| 5 | +#' `TunerAsyncMboADBO` class that implements Asynchronous Decentralized Bayesian Optimization (ADBO). |
| 6 | +#' ADBO is a variant of Asynchronous Model Based Optimization (AMBO) that uses [AcqFunctionStochasticCB] with exponential lambda decay. |
| 7 | +#' |
| 8 | +#' @note |
| 9 | +#' The lambda parameter of the upper confidence bound acquisition function controls the trade-off between exploration and exploitation. |
| 10 | +#' A large lambda value leads to more exploration, while a small lambda value leads to more exploitation. |
| 11 | +#' The initial lambda value is drawn from an exponential distribution with rate `1 / lambda`. |
| 12 | +#' ADBO can use periodic exponential decay to reduce lambda periodically with the formula `lambda * exp(-rate * (t %% period))`. |
| 13 | +#' The surrogate model is always a random forest and die acquisition optimizer is random search with a budget of 10,000 evaluations. |
| 14 | +#' |
| 15 | +#' @section Parameters: |
| 16 | +#' \describe{ |
| 17 | +#' \item{`lambda`}{`numeric(1)`\cr |
| 18 | +#' Lambda value for sampling from the exponential distribution.} |
| 19 | +#' \item{`rate`}{`numeric(1)`\cr |
| 20 | +#' Rate of the exponential decay.} |
| 21 | +#' \item{`period`}{`integer(1)`\cr |
| 22 | +#' Period of the exponential decay.} |
| 23 | +#' \item{`initial_design_size`}{`integer(1)`\cr |
| 24 | +#' Size of the initial design. |
| 25 | +#' Defaults to `100`.} |
| 26 | +#' |
| 27 | +#' \item{`initial_design`}{`data.table::data.table()`\cr |
| 28 | +#' Initial design of the optimization. |
| 29 | +#' If `NULL`, a design of size `design_size` is generated with `design_function`.} |
| 30 | +#' \item{`design_size`}{`integer(1)`\cr |
| 31 | +#' Size of the initial design.} |
| 32 | +#' \item{`design_function`}{`character(1)`\cr |
| 33 | +#' Function to generate the initial design. |
| 34 | +#' One of `c("random", "sobol", "lhs")`.} |
| 35 | +#' \item{`n_workers`}{`integer(1)`\cr |
| 36 | +#' Number of parallel workers. |
| 37 | +#' If `NULL`, all rush workers set with [rush::rush_plan()] are used.} |
| 38 | +#' } |
| 39 | +#' |
| 40 | +#' |
| 41 | +#' @references |
| 42 | +#' * `r format_bib("egele_2023")` |
| 43 | +#' |
| 44 | +#' @export |
| 45 | +TunerAsyncMboADBO = R6Class("TunerAsyncMboADBO", |
| 46 | + inherit = mlr3tuning::TunerAsyncFromOptimizerAsync, |
| 47 | + public = list( |
| 48 | + |
| 49 | + #' @description |
| 50 | + #' Creates a new instance of this [R6][R6::R6Class] class. |
| 51 | + initialize = function() { |
| 52 | + optimizer = OptimizerAsyncMboADBO$new() |
| 53 | + |
| 54 | + super$initialize( |
| 55 | + optimizer = optimizer, |
| 56 | + man = "mlr3tuning::mlr_tuners_adbo" |
| 57 | + ) |
| 58 | + } |
| 59 | + ) |
| 60 | +) |
| 61 | + |
| 62 | +#' @include aaa.R |
| 63 | +tuners[["adbo"]] = TunerAsyncMboADBO |
0 commit comments