You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# allocate memory for adding points to front for HV calculation in C
164
176
front2= t(rbind(self$ys_front, 0))
165
177
sms= .Call("c_sms_indicator", PACKAGE="mlr3mbo", cbs, self$ys_front, front2, self$epsilon, self$ref_point) # note that the negative indicator is returned from C
Copy file name to clipboardExpand all lines: R/AcqFunctionStochasticCB.R
+60-16Lines changed: 60 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,76 @@
8
8
#'
9
9
#' @description
10
10
#' Lower / Upper Confidence Bound with lambda sampling and decay.
11
-
#' The initial lambda value is drawn from an uniform distribution between `min_lambda` and `max_lambda` or from an exponential distribution with rate `1 / lambda`.
12
-
#' The lambda value is updated after each evaluation by the formula `lambda * exp(-rate * (t %% period))`.
11
+
#' The initial \eqn{\lambda} is drawn from an uniform distribution between `min_lambda` and `max_lambda` or from an exponential distribution with rate `1 / lambda`.
12
+
#' \eqn{\lambda} is updated after each update by the formula `lambda * exp(-rate * (t %% period))`, where `t` is the number of times the acquisition function has been updated.
13
+
#'
14
+
#' While this acquisition function usually would be used within an asynchronous optimizer, e.g., [OptimizerAsyncMbo],
15
+
#' it can in principle also be used in synchronous optimizers, e.g., [OptimizerMbo].
13
16
#'
14
17
#' @section Parameters:
15
18
#' * `"lambda"` (`numeric(1)`)\cr
16
-
#' Lambda value for sampling from the exponential distribution.
19
+
#' \eqn{\lambda} value for sampling from the exponential distribution.
17
20
#' Defaults to `1.96`.
18
21
#' * `"min_lambda"` (`numeric(1)`)\cr
19
-
#' Minimum value of lambdafor sampling from the uniform distribution.
22
+
#' Minimum value of \eqn{\lambda}for sampling from the uniform distribution.
20
23
#' Defaults to `0.01`.
21
24
#' * `"max_lambda"` (`numeric(1)`)\cr
22
-
#' Maximum value of lambda for sampling from the uniform distribution.
25
+
#' Maximum value of \eqn{\lambda} for sampling from the uniform distribution.
23
26
#' Defaults to `10`.
24
27
#' * `"distribution"` (`character(1)`)\cr
25
-
#' Distribution to sample lambda from.
28
+
#' Distribution to sample \eqn{\lambda} from.
26
29
#' One of `c("uniform", "exponential")`.
27
30
#' Defaults to `uniform`.
28
31
#' * `"rate"` (`numeric(1)`)\cr
29
32
#' Rate of the exponential decay.
30
33
#' Defaults to `0` i.e. no decay.
31
34
#' * `"period"` (`integer(1)`)\cr
32
35
#' Period of the exponential decay.
33
-
#' Defaults to `NULL` i.e. the decay has no period.
36
+
#' Defaults to `NULL`, i.e., the decay has no period.
37
+
#'
38
+
#' @section Note:
39
+
#' * This acquisition function always also returns its current (`acq_lambda`) and original (`acq_lambda_0`) \eqn{\lambda}.
40
+
#' These values will be logged into the [bbotk::ArchiveBatch] of the [bbotk::OptimInstanceBatch] of the [AcqOptimizer] and
41
+
#' therefore also in the [bbotk::Archive] of the actual [bbotk::OptimInstance] that is to be optimized.
Copy file name to clipboardExpand all lines: R/AcqFunctionStochasticEI.R
+53-8Lines changed: 53 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@
8
8
#'
9
9
#' @description
10
10
#' Expected Improvement with epsilon decay.
11
+
#' \eqn{\epsilon} is updated after each update by the formula `epsilon * exp(-rate * (t %% period))` where `t` is the number of times the acquisition function has been updated.
12
+
#'
13
+
#' While this acquisition function usually would be used within an asynchronous optimizer, e.g., [OptimizerAsyncMbo],
14
+
#' it can in principle also be used in synchronous optimizers, e.g., [OptimizerMbo].
11
15
#'
12
16
#' @section Parameters:
13
17
#' * `"epsilon"` (`numeric(1)`)\cr
@@ -20,13 +24,50 @@
20
24
#' Defaults to `0.05`.
21
25
#' * `"period"` (`integer(1)`)\cr
22
26
#' Period of the exponential decay.
23
-
#' Defaults to `NULL` i.e. the decay has no period.
27
+
#' Defaults to `NULL`, i.e., the decay has no period.
28
+
#'
29
+
#' @section Note:
30
+
#' * This acquisition function always also returns its current (`acq_epsilon`) and original (`acq_epsilon_0`) \eqn{\epsilon}.
31
+
#' These values will be logged into the [bbotk::ArchiveBatch] of the [bbotk::OptimInstanceBatch] of the [AcqOptimizer] and
32
+
#' therefore also in the [bbotk::Archive] of the actual [bbotk::OptimInstance] that is to be optimized.
0 commit comments