Skip to content

Commit

Permalink
Better example plots #13
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvagnihotri committed Apr 16, 2020
1 parent 6c8fd46 commit 3edb4f0
Show file tree
Hide file tree
Showing 81 changed files with 60 additions and 91 deletions.
Binary file modified public/images/MAB_pngs/EI3d/0.01/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/EI3d/0.01/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/GP_UCB3d/1-2/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/MAB_pngs/PI3d/0.05/5.png
Binary file modified public/images/MAB_pngs/PI3d/0.05/6.png
Binary file modified public/images/MAB_pngs/PI3d/0.05/7.png
Binary file modified public/images/MAB_pngs/PI3d/0.05/8.png
Binary file modified public/images/MAB_pngs/PI3d/0.05/9.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/0.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/1.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/2.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/3.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/4.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/5.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/6.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/7.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/8.png
Binary file modified public/images/MAB_pngs/RFEI3d/0.01/9.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/0.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/1.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/2.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/3.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/4.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/5.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/6.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/7.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/8.png
Binary file modified public/images/MAB_pngs/RFGP_UCB3d/1-2/9.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/0.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/1.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/2.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/3.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/4.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/5.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/6.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/7.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/8.png
Binary file modified public/images/MAB_pngs/RFPI3d/0.05/9.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/0.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/1.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/2.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/3.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/4.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/5.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/6.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/7.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/8.png
Binary file modified public/images/MAB_pngs/RFRand3d/1-2/9.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/0.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/1.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/2.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/3.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/4.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/5.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/6.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/7.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/8.png
Binary file modified public/images/MAB_pngs/Rand3d/1-2/9.png
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
"</table>"
],
"text/plain": [
"<GPy.models.gp_regression.GPRegression at 0x7f14088b4f60>"
"<GPy.models.gp_regression.GPRegression at 0x7f96eb4de668>"
]
},
"execution_count": 15,
Expand Down Expand Up @@ -1781,36 +1781,6 @@
" return pi_acq + lam * ei_acq"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
"# acq_params = {\n",
"# 'eps_pi': .2,\n",
"# 'eps_ei': .4,\n",
"# 'lam': 1,\n",
"# }\n",
"\n",
"# dirName, mtn_ei_pi = plot_acquisition(\n",
"# train_X, train_y,\n",
"# EI_PI, val, ylim1=((0, 10)),\n",
"# acq_params=acq_params,\n",
"# y1scale='log',\n",
"# )\n",
"\n",
"# # gify!\n",
"# !convert -delay {delay} -loop 0 {dirName}/*.png {gifDir}/mab-gp-ei_pi.gif"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](MAB_gifs/mab-gp-ei_pi.gif)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -1824,7 +1794,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1833,7 +1803,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 57,
"metadata": {
"scrolled": false
},
Expand Down Expand Up @@ -1967,7 +1937,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1979,7 +1949,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 59,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -2016,7 +1986,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 60,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2042,7 +2012,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": 61,
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -2073,7 +2043,7 @@
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": 62,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2083,7 +2053,7 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": 63,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2097,18 +2067,36 @@
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": 64,
"metadata": {},
"outputs": [],
"source": [
"nnsvm(plt.rcParams, 4)"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [],
"source": [
"from matplotlib.markers import MarkerStyle"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
"plt.scatter?"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
"# https://matplotlib.org/3.1.1/gallery/ticks_and_spines/colorbar_tick_labelling_demo.html\n",
"import sys\n",
Expand Down Expand Up @@ -2209,16 +2197,18 @@
" ax[0].scatter(\n",
" train_X[:, 0],\n",
" train_X[:, 1],\n",
" color='plum',\n",
" s=30,\n",
" facecolors='none', \n",
" edgecolors='k',\n",
" linewidth=4,\n",
" s=100,\n",
" zorder=10,\n",
" label='Training points'\n",
" )\n",
" # plot the global maxima\n",
" ax[0].scatter(\n",
" *max_x,\n",
" marker=\"*\", \n",
" color='yellow',\n",
" color='gold',\n",
" s=300,\n",
" zorder=20,\n",
" label=\"Gobal Maxima\"\n",
Expand All @@ -2239,40 +2229,19 @@
" ticks=ticks2,\n",
" ax=ax[1]\n",
" )\n",
" \n",
" if str(acq_obj) == \"PI\":\n",
" ax[1].set_title(\n",
" r'$\\alpha_{PI}$' + f\"\\nIteration: {i} \\n\" + \\\n",
" r\"$\\epsilon$ = \" + str(acq_params['eps'])\n",
" )\n",
" elif str(acq_obj) == \"EI\":\n",
" ax[1].set_title(\n",
" r'$\\alpha_{EI}$' + f\"\\nIteration: {i} \\n\" + \\\n",
" r\"$\\epsilon$ = \" + str(acq_params['eps'])\n",
" )\n",
" elif str(acq_obj) == \"GP_UCB\":\n",
" ax[1].set_title(\n",
" r'$\\alpha_{GP-UCB}$' + f\"\\nIteration: {i} \\n\" + \\\n",
" r\"$v$ = \" + str(acq_params['v']) + '\\n' \\\n",
" r\"$\\delta$ = \" + str(acq_params['delta'])\n",
" )\n",
" elif str(acq_obj) == \"Rand\":\n",
" ax[1].set_title(\n",
" r'$\\alpha_{Random}$' + f\"\\nIteration: {i}\"\n",
" )\n",
" else:\n",
" raise ValueError\n",
" ax[1].set_title(f\"Acquisition Function ({str(acq_obj)})\")\n",
" fig.suptitle(f\"Iteration: {i}\", fontsize='x-large')\n",
" \n",
" if svm:\n",
" ax[1].set_xlabel(r\"$\\log_{10}\\gamma$\")\n",
" ax[1].set_ylabel(r\"$C$\")\n",
" ax[0].set_xlabel(r\"$\\log_{10}\\gamma$\")\n",
" ax[0].set_ylabel(r\"$C$\")\n",
" ax[1].set_xlabel(r\"Hyperparam #1 $(\\gamma)$\")\n",
" ax[1].set_ylabel(r\"Hyperparam #2 $(C)$\")\n",
" ax[0].set_xlabel(r\"Hyperparam #1 $(\\gamma)$\")\n",
" ax[0].set_ylabel(r\"Hyperparam #2 $(C)$\")\n",
" else:\n",
" ax[1].set_xlabel(\"# of Trees\")\n",
" ax[1].set_ylabel(\"Max Depth\")\n",
" ax[0].set_xlabel(\"# of Trees\")\n",
" ax[0].set_ylabel(\"Max Depth\")\n",
" ax[1].set_xlabel(\"Hyperparam #1 (# of Trees)\")\n",
" ax[1].set_ylabel(\"Hyperparam #2 (Max Depth)\")\n",
" ax[0].set_xlabel(\"Hyperparam #1 (# of Trees)\")\n",
" ax[0].set_ylabel(\"Hyperparam #2 (Max Depth)\")\n",
"\n",
" # Add new point with highest uncertainty to the pool set\n",
" ax[1].scatter(\n",
Expand Down Expand Up @@ -2327,7 +2296,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": 68,
"metadata": {
"scrolled": false
},
Expand Down Expand Up @@ -2357,7 +2326,7 @@
},
{
"cell_type": "code",
"execution_count": 68,
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2384,7 +2353,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 70,
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -2418,7 +2387,7 @@
},
{
"cell_type": "code",
"execution_count": 70,
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -2451,7 +2420,7 @@
},
{
"cell_type": "code",
"execution_count": 71,
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -2500,7 +2469,7 @@
},
{
"cell_type": "code",
"execution_count": 72,
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -2691,7 +2660,7 @@
},
{
"cell_type": "code",
"execution_count": 73,
"execution_count": 74,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2700,7 +2669,7 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 75,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2726,7 +2695,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": 76,
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -2757,7 +2726,7 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": 77,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -2766,7 +2735,7 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": 78,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -2906,7 +2875,7 @@
},
{
"cell_type": "code",
"execution_count": 78,
"execution_count": 79,
"metadata": {
"scrolled": false
},
Expand Down Expand Up @@ -2936,7 +2905,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": 80,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -2964,7 +2933,7 @@
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": 81,
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -2998,7 +2967,7 @@
},
{
"cell_type": "code",
"execution_count": 81,
"execution_count": 82,
"metadata": {
"scrolled": false
},
Expand Down Expand Up @@ -3034,7 +3003,7 @@
},
{
"cell_type": "code",
"execution_count": 82,
"execution_count": 83,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -3043,7 +3012,7 @@
},
{
"cell_type": "code",
"execution_count": 83,
"execution_count": 84,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 3edb4f0

Please sign in to comment.