Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions GPy/GPyCrashCourse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@
"In this tutorial I will run through a few basic features of GPy."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import GPy\n",
"except ImportError:\n",
" import subprocess\n",
" import sys\n",
" subprocess.check_call(\n",
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\", \"gpy[plotting]>=1.15.0\"]\n",
" )\n",
" import GPy\n",
"try:\n",
" import pods\n",
"except ImportError:\n",
" import subprocess\n",
" import sys\n",
" subprocess.check_call(\n",
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\", 'pods']\n",
" )\n",
" import pods\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -26,9 +54,8 @@
"import pods\n",
"from matplotlib import pyplot as plt\n",
"np.random.seed(1)\n",
"%matplotlib inline\n",
"#%config InlineBackend.figure_format = 'svg'\n",
"#import matplotlib;matplotlib.rcParams['figure.figsize'] = (8,5)"
"#import matplotlib;matplotlib.rcParams['figure.figsize'] = (8,5)\n"
]
},
{
Expand Down
28 changes: 19 additions & 9 deletions GPy/Integral_kernel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SheffieldML/notebook/blob/main/GPy/Integral_kernel.ipynb)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import GPy\n",
"except ImportError:\n",
" import subprocess\n",
" import sys\n",
" subprocess.check_call(\n",
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\", \"gpy[plotting]>=1.15.0\"]\n",
" )\n",
" import GPy\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -19,7 +37,6 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"%matplotlib inline\n",
"\n",
"def plot_hist(bins,bin_ranges,errs,alpha):\n",
" \"\"\"Plots a histogram\"\"\"\n",
Expand All @@ -46,7 +63,7 @@
" simple_inputs = np.array(simple_inputs)\n",
"\n",
" original_outputs = np.array(outputs)\n",
" return inputs,simple_inputs,original_outputs"
" return inputs,simple_inputs,original_outputs\n"
]
},
{
Expand Down Expand Up @@ -240,13 +257,6 @@
"source": [
"The above curve is based on the histogram 'binned' data."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
21 changes: 19 additions & 2 deletions GPy/MagnificationFactor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@
"Note: Requires GPy Version >= 0.8"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import GPy\n",
"except ImportError:\n",
" import subprocess\n",
" import sys\n",
" subprocess.check_call(\n",
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\", \"gpy[plotting]>=1.15.0\"]\n",
" )\n",
" import GPy\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -29,11 +47,10 @@
"import numpy as np\n",
"if not hasattr(np, \"NaN\"):\n",
" np.NaN = np.nan # pods mocap still uses np.NaN\n",
"%matplotlib inline\n",
"from matplotlib import pyplot as plt\n",
"import GPy # import GPy package\n",
"np.random.seed(12345)\n",
"GPy.plotting.change_plotting_library('matplotlib')"
"GPy.plotting.change_plotting_library('matplotlib')\n"
]
},
{
Expand Down
21 changes: 19 additions & 2 deletions GPy/ParametricNonParametricInference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@
"$$\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import GPy\n",
"except ImportError:\n",
" import subprocess\n",
" import sys\n",
" subprocess.check_call(\n",
" [sys.executable, \"-m\", \"pip\", \"install\", \"-q\", \"gpy[plotting]>=1.15.0\"]\n",
" )\n",
" import GPy\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -82,8 +100,7 @@
"source": [
"import GPy, numpy as np, pandas as pd\n",
"from GPy.kern import LinearSlopeBasisFuncKernel, DomainKernel, ChangePointBasisFuncKernel\n",
"%matplotlib inline\n",
"from matplotlib import pyplot as plt"
"from matplotlib import pyplot as plt\n"
]
},
{
Expand Down
Loading
Loading