Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/src/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,36 @@ To enable parallel optimization, we make use of an Ask-Tell interface. The user
To ensure that points of interest returned by `potential_optimal_points` are sufficiently far from each other, the function makes use of *virtual points*. They are used as follows:

1. `potential_optimal_points` is told to return `n` points.
2. The point with the highest merit function value is selected.
3. This point is now treated as a virtual point and is assigned a temporary value that changes the landscape of the merit function. How the temporary value is chosen depends on the strategy used. (see below)
4. The point with the new highest merit is selected.
2. The best-scoring candidate is selected. `SRBF` minimizes its merit function, `EI` maximizes expected improvement.
3. This point is now treated as a virtual point: it is added to a temporary copy of the surrogate with an assigned value, which changes the acquisition landscape. How that value is chosen depends on the strategy used (see below). The surrogate you passed in is never modified.
4. The best-scoring candidate under the updated temporary surrogate is selected. Candidates within the minimum-separation tolerance of an already-chosen point are rejected, so a batch never repeats a point.
5. The process is repeated until `n` points have been selected.

The following strategies are available for virtual point selection for all optimization algorithms:

- "Minimum Constant Liar (MinimumConstantLiar)":

+ The virtual point is assigned using the lowest known value of the merit function across all evaluated points.
+ The virtual point is assigned the lowest observed objective value.

- "Mean Constant Liar (MeanConstantLiar)":

+ The virtual point is assigned using the mean of the merit function across all evaluated points.
+ The virtual point is assigned the mean of the observed objective values.
- "Maximum Constant Liar (MaximumConstantLiar)":

+ The virtual point is assigned using the greatest known value of the merit function across all evaluated points.
+ The virtual point is assigned the greatest observed objective value.

For Kriging surrogates, specifically, the above and following strategies are available:

- "Kriging Believer (KrigingBeliever):

+ The virtual point is assigned using the mean of the Kriging surrogate at the virtual point.
+ The virtual point is assigned the Kriging mean at that point, predicted by the temporary surrogate, so each belief accounts for the ones already placed in this batch.

- "Kriging Believer Upper Bound (KrigingBelieverUpperBound)":

+ The virtual point is assigned using 3$\sigma$ above the mean of the Kriging surrogate at the virtual point.
+ The virtual point is assigned 3$\sigma$ above the temporary surrogate's mean at that point.
- "Kriging Believer Lower Bound (KrigingBelieverLowerBound)":

+ The virtual point is assigned using 3$\sigma$ below the mean of the Kriging surrogate at the virtual point.
+ The virtual point is assigned 3$\sigma$ below the temporary surrogate's mean at that point.

In general, MinimumConstantLiar and KrigingBelieverLowerBound tend to favor exploitation, while MaximumConstantLiar and KrigingBelieverUpperBound tend to favor exploration. MeanConstantLiar and KrigingBeliever tend to be compromises between the two.

Expand Down
13 changes: 9 additions & 4 deletions src/Lobachevsky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ function phi_nj1D(point, x, alpha, n)
val += ifelse(iseven(l), b, -b) * a^(n - 1)
b = b * (n - l) ÷ (l + 1)
end
return val * (c / (2^n * factorial(Int64(n) - 1)))
# Divided in two steps rather than by one product: `2^n * factorial(n - 1)`
# overflows `Int64` at n = 18 without warning, and the wrapped value is
# negative at n = 20.
return val * (c / 2^n / factorial(Int64(n) - 1))
end

# `weight(j)` is the scalar multiplying sample `j`, so one pair serves both
Expand All @@ -107,8 +110,10 @@ function _calc_loba_coeff1D(x, y, alpha, n, sparse)
return Sym \ _construct_y_matrix(y, first(y))
end

# The kernel evaluates `factorial(Int64(n) - 1)` and `_phi_int` `factorial(Int64(n))`, and
# `factorial(::Int)` overflows above 20.
# The kernel evaluates `factorial(Int64(n) - 1)` and `_phi_int`
# `factorial(Int64(n))`. Widening to `Int64` keeps the bound independent of the
# platform word size -- `factorial(::Int)` stops at 12 on a 32-bit build -- and
# `factorial(::Int64)` overflows above 20.
function _check_lobachevsky_n(n)
if n <= 0 || n % 2 != 0
throw(ArgumentError("Kernel order n must be even and positive! Got: $n."))
Expand Down Expand Up @@ -209,7 +214,7 @@ function _phi_int(point, n)
res += ifelse(iseven(k), b, -b) * c^n
b = b * (n - k) ÷ (k + 1)
end
return res / (2^n * factorial(Int64(n)))
return res / 2^n / factorial(Int64(n))
end

function lobachevsky_integral(loba::LobachevskySurrogate, lb::Number, ub::Number)
Expand Down
Loading
Loading