Skip to content

Commit 5b1b3f4

Browse files
committed
Update figures
1 parent 377de1c commit 5b1b3f4

36 files changed

+18
-6
lines changed

examples/plot_benchmarks.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ def plot_1d(obj_fun,
99
str_y_axis=r'$f(x)$',
1010
str_figures='../figures',
1111
show_figure=False,
12+
bounds=None, # for zooming in on part of a figure
1213
):
1314
print(str_fun)
14-
bounds = obj_fun.get_bounds()
15+
16+
if bounds is None:
17+
bounds = obj_fun.get_bounds()
1518
print(bounds)
1619
assert bounds.shape[0] == 1
1720

@@ -142,7 +145,7 @@ def plot_2d(obj_fun,
142145
# one dim.
143146
from bayeso_benchmarks.one_dim_gramacyandlee2012 import GramacyAndLee2012 as target_class
144147
obj_fun = target_class()
145-
plot_1d(obj_fun, 'gramacyandlee2012')
148+
plot_1d(obj_fun, 'gramacyandlee2012_1d')
146149

147150
from bayeso_benchmarks.inf_dim_ackley import Ackley as target_class
148151
obj_fun = target_class(1)
@@ -152,6 +155,11 @@ def plot_2d(obj_fun,
152155
obj_fun = target_class(1)
153156
plot_1d(obj_fun, 'cosines_1d')
154157

158+
from bayeso_benchmarks.inf_dim_griewank import Griewank as target_class
159+
obj_fun = target_class(1)
160+
plot_1d(obj_fun, 'griewank_1d')
161+
plot_1d(obj_fun, 'griewank_zoom_in_1d', bounds=np.array([[-50, 50]]))
162+
155163
from bayeso_benchmarks.inf_dim_levy import Levy as target_class
156164
obj_fun = target_class(1)
157165
plot_1d(obj_fun, 'levy_1d')
@@ -164,6 +172,10 @@ def plot_2d(obj_fun,
164172
obj_fun = target_class(1)
165173
plot_1d(obj_fun, 'sphere_1d')
166174

175+
from bayeso_benchmarks.inf_dim_zakharov import Zakharov as target_class
176+
obj_fun = target_class(1)
177+
plot_1d(obj_fun, 'zakharov_1d')
178+
167179
# two dim.
168180
from bayeso_benchmarks.two_dim_beale import Beale as target_class
169181
obj_fun = target_class()
@@ -237,15 +249,15 @@ def plot_2d(obj_fun,
237249
obj_fun = target_class(2)
238250
plot_2d(obj_fun, 'ackley_2d')
239251

252+
from bayeso_benchmarks.inf_dim_cosines import Cosines as target_class
253+
obj_fun = target_class(2)
254+
plot_2d(obj_fun, 'cosines_2d')
255+
240256
from bayeso_benchmarks.inf_dim_griewank import Griewank as target_class
241257
obj_fun = target_class(2)
242258
plot_2d(obj_fun, 'griewank_2d')
243259
plot_2d(obj_fun, 'griewank_zoom_in_2d', bounds=np.array([[-50, 50], [-50, 50]]))
244260

245-
from bayeso_benchmarks.inf_dim_cosines import Cosines as target_class
246-
obj_fun = target_class(2)
247-
plot_2d(obj_fun, 'cosines_2d')
248-
249261
from bayeso_benchmarks.inf_dim_levy import Levy as target_class
250262
obj_fun = target_class(2)
251263
plot_2d(obj_fun, 'levy_2d')

figures/ackley_1d.pdf

0 Bytes
Binary file not shown.

figures/ackley_2d.pdf

0 Bytes
Binary file not shown.

figures/beale_2d.pdf

0 Bytes
Binary file not shown.

figures/bohachevsky_2d.pdf

0 Bytes
Binary file not shown.

figures/branin_2d.pdf

0 Bytes
Binary file not shown.

figures/bukin6_2d.pdf

0 Bytes
Binary file not shown.

figures/cosines_1d.pdf

0 Bytes
Binary file not shown.

figures/cosines_2d.pdf

0 Bytes
Binary file not shown.

figures/dejong5_2d.pdf

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)