Skip to content

Commit 04f741f

Browse files
committed
Visualization added for the function to be optimized
1 parent f1d12b1 commit 04f741f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/bayesian_optimization.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
# assembling initial training set
1515
X_initial, y_initial = X[150].reshape(1, -1), y[150].reshape(1, -1)
1616

17+
with plt.style.context('seaborn-white'):
18+
plt.figure(figsize=(12.5*1.5, 7.5*1.5))
19+
plt.plot(X, y, c='k', linewidth=6)
20+
plt.title('The function to be optimized')
21+
plt.show()
22+
1723
# defining the kernel for the Gaussian process
1824
kernel = Matern(length_scale=1.0)
1925

0 commit comments

Comments
 (0)