From f249ee66243df94523da882bc5604debb8bfc40a Mon Sep 17 00:00:00 2001 From: Alexander Cowen-Rivers Date: Mon, 17 Jan 2022 18:40:34 +0800 Subject: [PATCH] Update optimisation.ipynb Update mace-->hebo --- HEBO/doc/source/optimisation.ipynb | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/HEBO/doc/source/optimisation.ipynb b/HEBO/doc/source/optimisation.ipynb index 8c9bc6b9..0aa5c69e 100644 --- a/HEBO/doc/source/optimisation.ipynb +++ b/HEBO/doc/source/optimisation.ipynb @@ -140,8 +140,8 @@ "\n", "We compare three BO algorithms:\n", "- The basic BO with LCB acquisition\n", - "- MACE where three acquisition functions are ensembled, with input warping and power transformation\n", - "- MACE with parallel recommendation\n", + "- HEBO where three acquisition functions are ensembled, with input warping and power transformation\n", + "- HEBO with parallel recommendation\n", "\n", "We'll run BO with LCB firstly, we can see the interface is very simple" ] @@ -187,7 +187,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We then run the sequential MACE" + "We then run the sequential HEBO" ] }, { @@ -219,12 +219,12 @@ } ], "source": [ - "mace_seq = HEBO(space, model_name = 'gpy', rand_sample = 4)\n", + "hebo_seq = HEBO(space, model_name = 'gpy', rand_sample = 4)\n", "for i in range(64):\n", - " rec_x = mace_seq.suggest(n_suggestions=1)\n", - " mace_seq.observe(rec_x, obj(rec_x))\n", + " rec_x = hebo_seq.suggest(n_suggestions=1)\n", + " hebo_seq.observe(rec_x, obj(rec_x))\n", " if i % 4 == 0:\n", - " print('Iter %d, best_y = %.2f' % (i, mace_seq.y.min()))" + " print('Iter %d, best_y = %.2f' % (i, hebo_seq.y.min()))" ] }, { @@ -263,11 +263,11 @@ } ], "source": [ - "mace_batch = HEBO(space, model_name = 'gpy', rand_sample = 4)\n", + "hebo_batch = HEBO(space, model_name = 'gpy', rand_sample = 4)\n", "for i in range(16):\n", - " rec_x = mace_batch.suggest(n_suggestions=8)\n", - " mace_batch.observe(rec_x, obj(rec_x))\n", - " print('Iter %d, best_y = %.2f' % (i, mace_batch.y.min()))" + " rec_x = hebo_batch.suggest(n_suggestions=8)\n", + " hebo_batch.observe(rec_x, obj(rec_x))\n", + " print('Iter %d, best_y = %.2f' % (i, hebo_batch.y.min()))" ] }, { @@ -276,8 +276,8 @@ "metadata": {}, "outputs": [], "source": [ - "conv_mace_batch = np.minimum.accumulate(mace_batch.y)\n", - "conv_mace_seq = np.minimum.accumulate(mace_seq.y)\n", + "conv_hebo_batch = np.minimum.accumulate(hebo_batch.y)\n", + "conv_hebo_seq = np.minimum.accumulate(hebo_seq.y)\n", "conv_bo_seq = np.minimum.accumulate(bo.y)" ] }, @@ -285,7 +285,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We plot the converge below, we can see it seems that the LCB converges slightly faster than MACE, while batched MACE used most function evaluations" + "We plot the converge below, we can see it seems that the LCB converges slightly faster than HEBO, while batched HEBO used most function evaluations" ] }, { @@ -318,8 +318,8 @@ ], "source": [ "plt.figure(figsize = (8,6))\n", - "plt.semilogy(conv_mace_batch - problem.ideal_point(), 'x-',label = 'MACE, Parallel,Batch = 8')\n", - "plt.semilogy(conv_mace_seq - problem.ideal_point(), 'x-',label = 'MACE, Sequential')\n", + "plt.semilogy(conv_hebo_batch - problem.ideal_point(), 'x-',label = 'HEBO, Parallel,Batch = 8')\n", + "plt.semilogy(conv_hebo_seq - problem.ideal_point(), 'x-',label = 'HEBO, Sequential')\n", "plt.semilogy(conv_bo_seq - problem.ideal_point(), 'x-',label = 'BO, LCB')\n", "\n", "plt.xlabel('Evaluation')\n", @@ -331,7 +331,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Batched MACE used most function evaluations because it recommend eight points per iterations, we can also plot the converge against **iterations** instead of **evaluations**" + "Batched HEBO used most function evaluations because it recommend eight points per iterations, we can also plot the converge against **iterations** instead of **evaluations**" ] }, { @@ -364,8 +364,8 @@ ], "source": [ "plt.figure(figsize = (8,6))\n", - "plt.semilogy(conv_mace_batch[::8] - problem.ideal_point(), 'x-',label = 'MACE, Parallel,Batch = 8')\n", - "plt.semilogy(conv_mace_seq - problem.ideal_point(), 'x-',label = 'MACE, Sequential')\n", + "plt.semilogy(conv_hebo_batch[::8] - problem.ideal_point(), 'x-',label = 'HEBO, Parallel,Batch = 8')\n", + "plt.semilogy(conv_hebo_seq - problem.ideal_point(), 'x-',label = 'HEBO, Sequential')\n", "plt.semilogy(conv_bo_seq - problem.ideal_point(), 'x-',label = 'BO, LCB')\n", "\n", "plt.xlabel('Iterations')\n", @@ -377,7 +377,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can see that parallel MACE converges much faster" + "We can see that parallel HEBO converges much faster" ] } ],