Skip to content

Commit f1d12b1

Browse files
committed
Plots uniformized
1 parent a6dd5de commit f1d12b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/bayesian_optimization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@
3838

3939
# plotting the initial estimation
4040
with plt.style.context('seaborn-white'):
41-
plt.figure(figsize=(30, 6))
41+
plt.figure(figsize=(35, 7))
4242
for n_query in range(5):
4343
# plot current prediction
4444
plt.subplot(2, 5, n_query + 1)
4545
plt.title('Query no. %d' %(n_query + 1))
4646
if n_query == 0:
4747
plt.ylabel('Predictions')
48+
plt.xlim([-1.0, 21.0])
4849
plt.ylim([-1.5, 3])
4950
pred, std = optimizer.predict(X.reshape(-1, 1), return_std=True)
5051
utility_score = acquisition(optimizer, X)
@@ -59,7 +60,7 @@
5960
if n_query == 0:
6061
plt.ylabel(acquisition.__name__)
6162
plt.plot(X, 5 * utility_score, c='r')
62-
#plt.ylim([-0.1, 1])
63+
plt.xlim([-1.0, 21.0])
6364

6465
# query
6566
query_idx, query_inst = optimizer.query(X)

0 commit comments

Comments
 (0)