From 58f84f197e33a219bf7f0f3b551dd1ec4d2357c0 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 21 Feb 2013 11:17:09 +0000 Subject: [PATCH] Tutorial improved --- doc/tuto_kernel_overview.rst | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/doc/tuto_kernel_overview.rst b/doc/tuto_kernel_overview.rst index 0d6b1097..6c818648 100644 --- a/doc/tuto_kernel_overview.rst +++ b/doc/tuto_kernel_overview.rst @@ -46,6 +46,11 @@ Many kernels are already implemented in GPy. Here is a summary of most of them: On the other hand, it is possible to use the `sympy` package to build new kernels. This will be the subject of another tutorial. + +Constraining the parameters +=========================== + + Operations to combine kernel ============================ @@ -67,7 +72,7 @@ These two options are available in GPy under the name ``prod`` and ``prod_orthog k_add = k1.add(k2) k_addorth = k1.add_orthogonal(k2) - # plots +.. # plots pb.figure(figsize=(8,8)) pb.subplot(2,2,1) k_prod.plot() @@ -85,7 +90,7 @@ These two options are available in GPy under the name ``prod`` and ``prod_orthog .. figure:: Figures/tuto_kern_overview_multadd.png :align: center - :height: 1500px + :height: 500px A shortcut for ``add`` and ``prod`` is provided by the usual ``+`` and ``*`` operators. Here is another example where we create a periodic kernel with some decay :: @@ -109,22 +114,9 @@ A shortcut for ``add`` and ``prod`` is provided by the usual ``+`` and ``*`` ope pb.subplots_adjust(wspace=0.3) .. figure:: Figures/tuto_kern_overview_multperdecay.png - :align: center - :height: 800px - - -Note that by default, the operator ``+`` adds kernels defined on the same input space whereas ``*`` assumes that the kernels are defined on different input spaces. Here for example ``ker_add.D`` will return ``1`` whereas ``ker_prod.D`` will return ``2``. - -In order to add kernels defined on the different input spaces, the required command is:: - - ker_add_orth = k1.add_orthogonal(k2) - -.. figure:: Figures/tuto_kern_overview_add_orth.png :align: center :height: 350px - Output of ``ker_add_orth.plot(plot_limits=[[-10,-10],[10,10]])``. - Example : Building an ANOVA kernel ==================================