Skip to content

Commit

Permalink
very small changes to the example notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Oct 12, 2018
1 parent bb9013c commit 497c576
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions learner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@
"\n",
"# The `cdims` will automatically be set when using `from_product`, so\n",
"# `plot()` will return a HoloMap with correctly labeled sliders.\n",
"learner.plot().overlay('beta').grid()"
"learner.plot().overlay('beta').grid().select(y=(-1, 3))"
]
},
{
Expand Down Expand Up @@ -859,7 +859,7 @@
"metadata": {},
"outputs": [],
"source": [
"def g(x, noise_level=0.1):\n",
"def F(x, noise_level=0.1):\n",
" return (np.sin(5 * x) * (1 - np.tanh(x ** 2))\n",
" + np.random.randn() * noise_level)"
]
Expand All @@ -870,7 +870,7 @@
"metadata": {},
"outputs": [],
"source": [
"learner = adaptive.SKOptLearner(g, dimensions=[(-2., 2.)],\n",
"learner = adaptive.SKOptLearner(F, dimensions=[(-2., 2.)],\n",
" base_estimator=\"GP\",\n",
" acq_func=\"gp_hedge\",\n",
" acq_optimizer=\"lbfgs\",\n",
Expand All @@ -887,7 +887,7 @@
"source": [
"%%opts Overlay [legend_position='top']\n",
"xs = np.linspace(*learner.space.bounds[0])\n",
"to_learn = hv.Curve((xs, [g(x, 0) for x in xs]), label='to learn')\n",
"to_learn = hv.Curve((xs, [F(x, 0) for x in xs]), label='to learn')\n",
"\n",
"runner.live_plot().relabel('prediction', depth=2) * to_learn"
]
Expand Down

0 comments on commit 497c576

Please sign in to comment.