Skip to content

Commit

Permalink
docs: minor wording changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sumny committed Nov 22, 2024
1 parent 0716dd1 commit a97fdbf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions R/AcqFunction.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ AcqFunction = R6Class("AcqFunction",
},

#' @description
#' Evaluates multiple input values on the objective function.
#' Evaluates multiple input values on the acquisition function.
#'
#' @param xss (`list()`)\cr
#' A list of lists that contains multiple x values, e.g.
#' `list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4))`.
#'
#' @return data.table::data.table() that contains one y-column for
#' single-objective functions and multiple y-columns for multi-objective functions,
#' e.g. `data.table(y = 1:2)` or `data.table(y1 = 1:2, y2 = 3:4)`.
#' single-objective acquisition functions and multiple y-columns for multi-objective
#' acquisition functions, e.g. `data.table(y = 1:2)` or `data.table(y1 = 1:2, y2 = 3:4)`.
eval_many = function(xss) {
if (self$check_values) lapply(xss, self$domain$assert)
res = invoke(private$.fun, rbindlist(xss, use.names = TRUE, fill = TRUE), .args = self$constants$values)
Expand All @@ -105,8 +105,8 @@ AcqFunction = R6Class("AcqFunction",
#' One point per row, e.g. `data.table(x1 = c(1, 3), x2 = c(2, 4))`.
#'
#' @return data.table::data.table() that contains one y-column for
#' single-objective functions and multiple y-columns for multi-objective
#' functions, e.g. `data.table(y = 1:2)` or `data.table(y1 = 1:2, y2 = 3:4)`.
#' single-objective acquisition functions and multiple y-columns for multi-objective
#' acquisition functions, e.g. `data.table(y = 1:2)` or `data.table(y1 = 1:2, y2 = 3:4)`.
eval_dt = function(xdt) {
if (self$check_values) self$domain$assert_dt(xdt)
res = invoke(private$.fun, xdt, .args = self$constants$values)
Expand All @@ -118,7 +118,7 @@ AcqFunction = R6Class("AcqFunction",
active = list(
#' @field direction (`"same"` | `"minimize"` | `"maximize"`)\cr
#' Optimization direction of the acquisition function relative to the direction of the
#' objective function of the [bbotk::OptimInstance].
#' objective function of the [bbotk::OptimInstance] related to the passed [bbotk::Archive].
#' Must be `"same"`, `"minimize"`, or `"maximize"`.
direction = function(rhs) {
if (missing(rhs)) {
Expand Down
4 changes: 2 additions & 2 deletions R/AcqOptimizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' result in computing the q- or multi-Expected Improvement) but rather the top `n_candidates` are selected from the
#' [bbotk::ArchiveBatch] of the acquisition function [bbotk::OptimInstanceBatch].
#' Note that setting `n_candidates > 1` is usually not a sensible idea but it is still supported for experimental reasons.
#' Note that in the case of the acquisition function [bbotk::OptimInstanceBatch] being multi-criteria, due to using an [AcqFunctionMulti],
#' Note that in the case of the acquisition function [bbotk::OptimInstanceBatch] being multi-objective, due to using an [AcqFunctionMulti],
#' selection of the best candidates is performed via non-dominated-sorting.
#' Default is `1`.
#' }
Expand All @@ -26,7 +26,7 @@
#' the actual [bbotk::OptimInstance] (which is contained in the archive of the [AcqFunction])?
#' This is sensible when using a population based acquisition function optimizer, e.g., local search or mutation.
#' Default is `FALSE`.
#' Note that in the case of the [bbotk::OptimInstance] being multi-criteria, selection of the best point(s) is performed via non-dominated-sorting.
#' Note that in the case of the [bbotk::OptimInstance] being multi-objective, selection of the best point(s) is performed via non-dominated-sorting.
#' }
#' \item{`warmstart_size`}{`integer(1) | "all"`\cr
#' Number of best points selected from the [bbotk::Archive] of the actual [bbotk::OptimInstance] that are to be used for warm starting.
Expand Down
12 changes: 6 additions & 6 deletions man/AcqFunction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/AcqOptimizer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a97fdbf

Please sign in to comment.