Description Usage Arguments Value Examples
If the underlying single-objective functions are smoof
-functions,
extract their local optima and add them to the gradient field heatmap.
1 2 | addGGOptima(g, fn1, fn2, fn3, symbol1 = 21L, symbol2 = 22L,
symbol3 = 24L, ...)
|
g |
[ |
fn1 |
[ |
fn2 |
[ |
fn3 |
[ |
symbol1 |
[ |
symbol2 |
[ |
symbol3 |
[ |
... |
[any] |
[ggplot
]
A ggplot
object displaying the multi-objective gradient landscape.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Define two single-objective test problems and a grid of points:
fn1 = smoof::makeBBOBFunction(dimension = 2L, fid = 1L, iid = 1L)
fn2 = smoof::makeBBOBFunction(dimension = 2L, fid = 1L, iid = 2L)
points = as.matrix(expand.grid(x1 = seq(0, 1, 0.05), x2 = seq(0, 1, 0.05)))
## Not run:
# Compute the corresponding gradients and the cumulated path lengths:
gradients = computeGradientField(points, fn1, fn2)
x = computeCumulatedPathLengths(points, gradients)
# Visualize the resulting multi-objective "landscape":
g = ggplotHeatmap(x)
g
# Add "pink" symbols to the optima of the respective objectives:
addGGOptima(g, fn1, fn2, size = 6, fill = "hotpink")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.