Skip to content

Commit

Permalink
Update GP tutorials to unblock #3174 (#3175)
Browse files Browse the repository at this point in the history
* Update GP tutorials

* Update the noise instead of lengthscale
  • Loading branch information
fehiepsi committed Jan 21, 2023
1 parent 19e32df commit af3db08
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions tutorial/source/bo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
],
"source": [
"x = torch.linspace(0, 1)\n",
"x = torch.linspace(0, 1, 100)\n",
"plt.figure(figsize=(8, 4))\n",
"plt.plot(x.numpy(), f(x).numpy())\n",
"plt.show()"
Expand Down Expand Up @@ -297,7 +297,7 @@
"source": [
"def plot(gs, xmin, xlabel=None, with_title=True):\n",
" xlabel = \"xmin\" if xlabel is None else \"x{}\".format(xlabel)\n",
" Xnew = torch.linspace(-0.1, 1.1)\n",
" Xnew = torch.linspace(-0.1, 1.1, 100)\n",
" ax1 = plt.subplot(gs[0])\n",
" ax1.plot(gpmodel.X.numpy(), gpmodel.y.numpy(), \"kx\") # plot all observed data\n",
" with torch.no_grad():\n",
Expand Down Expand Up @@ -389,7 +389,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -403,7 +403,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.9.10"
}
},
"nbformat": 4,
Expand Down

0 comments on commit af3db08

Please sign in to comment.