Emulator workshop: Lab sessions

The workshop will include some hands-on tutorials in which we will build some simple Gaussian process models. The tutorials will be in Python, featuring the GPy package that has been developed by the Machine Learning group in Sheffield.

Prior Python programming skills are not needed, however, Python 3 needs to be installed with the following packages: scipy, matplotlib, nose, and GPy.

Please bring your own laptop.

Installing Python

We highly recommend that you install an integrated Python environment such as Anaconda https://store. continuum.io/cshop/anaconda. This will automatically install the latest versions of numpy and scipy.

Windows

The easiest way to get a Python environment on Windows is to install an integrated Python package such as Anacoda:

  1. Download and install the free version of Anaconda according to your operating system from https://store.continuum.io/cshop/anaconda

  2. Open a (new) terminal window: Navigate to Applications/Accessories/cmd, or open anaconda Command Prompt from windows start

You should now be able to launch an IPython interpreter or launch a jupyter notebook.

I found that I had to also install the Visual C++ Build Tools before I could install GPy, but you may already have that installed.

Linux / Mac OS X

The installation file of Anaconda for Linux and Mac OS X can also be found on their website https: //store.continuum.io/cshop/anaconda. Following the installation instructions on their website should be straight-forward.

Installing GPy

The current version of GPy requires a new version of scipy (scipy>=0.16). Make sure you get the latest version of scipy installed. To update scipy in Anaconda, simply type conda update scipy (if you have just installed Python for the first time, then you should already be up to date). After installing a Python environment with numpy and scipy, GPy can be easily installed via pip:

$ pip install GPy

To make sure the installation is successful, enter the following in the IPython prompt:

$ import GPy
$ GPy.tests()

Lab worksheets

Download the lab worksheet from the link below. You’ll need to save the text file with a .ipynb extension.

Open the worksheet in Jupyter notebook. For linux/mac users, you can do this from the command line by typing

jupyter notebook

in the directory where you save the file. On windows, select the Jupyter notebook or the anaconda terminal from the Anaconda program options.