diff --git a/GPy/__init__.py b/GPy/__init__.py index c0772c27..fa69dac3 100644 --- a/GPy/__init__.py +++ b/GPy/__init__.py @@ -9,3 +9,10 @@ import util import examples from core import priors import likelihoods +import testing +from numpy.testing import Tester +from nose.tools import nottest + +@nottest +def tests(): + Tester(testing).test(verbose=10) diff --git a/GPy/examples/__init__.py b/GPy/examples/__init__.py index 2f3cf0f4..ce4618ac 100644 --- a/GPy/examples/__init__.py +++ b/GPy/examples/__init__.py @@ -6,3 +6,4 @@ import classification import regression import unsupervised +import tutorials diff --git a/GPy/examples/tuto_GP_regression.py b/GPy/examples/tuto_GP_regression.py deleted file mode 100644 index b3953de0..00000000 --- a/GPy/examples/tuto_GP_regression.py +++ /dev/null @@ -1,56 +0,0 @@ -# The detailed explanations of the commands used in this file can be found in the tutorial section - -import pylab as pb -pb.ion() -import numpy as np -import GPy - -X = np.random.uniform(-3.,3.,(20,1)) -Y = np.sin(X) + np.random.randn(20,1)*0.05 - -kernel = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) - -m = GPy.models.GP_regression(X,Y,kernel) - -print m -m.plot() - -m.constrain_positive('') - -m.unconstrain('') # Required to remove the previous constrains -m.constrain_positive('rbf_variance') -m.constrain_bounded('lengthscale',1.,10. ) -m.constrain_fixed('noise',0.0025) - -m.optimize() - -m.optimize_restarts(Nrestarts = 10) - -########################### -# 2-dimensional example # -########################### - -import pylab as pb -pb.ion() -import numpy as np -import GPy - -# sample inputs and outputs -X = np.random.uniform(-3.,3.,(50,2)) -Y = np.sin(X[:,0:1]) * np.sin(X[:,1:2])+np.random.randn(50,1)*0.05 - -# define kernel -ker = GPy.kern.Matern52(2,ARD=True) + GPy.kern.white(2) - -# create simple GP model -m = GPy.models.GP_regression(X,Y,ker) - -# contrain all parameters to be positive -m.constrain_positive('') - -# optimize and plot -pb.figure() -m.optimize('tnc', max_f_eval = 1000) - -m.plot() -print(m) diff --git a/GPy/examples/tuto_kernel_overview.py b/GPy/examples/tuto_kernel_overview.py deleted file mode 100644 index ebd19d76..00000000 --- a/GPy/examples/tuto_kernel_overview.py +++ /dev/null @@ -1,139 +0,0 @@ -# The detailed explanations of the commands used in this file can be found in the tutorial section - -import pylab as pb -import numpy as np -import GPy -pb.ion() - -ker1 = GPy.kern.rbf(1) # Equivalent to ker1 = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) -ker2 = GPy.kern.rbf(D=1, variance = .75, lengthscale=2.) -ker3 = GPy.kern.rbf(1, .5, .5) - -print ker2 -ker1.plot() -ker2.plot() -ker3.plot() - -k1 = GPy.kern.rbf(1,1.,2.) -k2 = GPy.kern.Matern32(1, 0.5, 0.2) - -# Product of kernels -k_prod = k1.prod(k2) -k_prodorth = k1.prod_orthogonal(k2) - -# Sum of kernels -k_add = k1.add(k2) -k_addorth = k1.add_orthogonal(k2) - -pb.figure(figsize=(8,8)) -pb.subplot(2,2,1) -k_prod.plot() -pb.title('prod') -pb.subplot(2,2,2) -k_prodorth.plot() -pb.title('prod_orthogonal') -pb.subplot(2,2,3) -k_add.plot() -pb.title('add') -pb.subplot(2,2,4) -k_addorth.plot() -pb.title('add_orthogonal') -pb.subplots_adjust(wspace=0.3, hspace=0.3) - -k1 = GPy.kern.rbf(1,1.,2) -k2 = GPy.kern.periodic_Matern52(1,variance=1e3, lengthscale=1, period = 1.5, lower=-5., upper = 5) - -k = k1 * k2 # equivalent to k = k1.prod(k2) -print k - -# Simulate sample paths -X = np.linspace(-5,5,501)[:,None] -Y = np.random.multivariate_normal(np.zeros(501),k.K(X),1) - -# plot -pb.figure(figsize=(10,4)) -pb.subplot(1,2,1) -k.plot() -pb.subplot(1,2,2) -pb.plot(X,Y.T) -pb.ylabel("Sample path") -pb.subplots_adjust(wspace=0.3) - -k = (k1+k2)*(k1+k2) -print k.parts[0].name, '\n', k.parts[1].name, '\n', k.parts[2].name, '\n', k.parts[3].name - -k1 = GPy.kern.rbf(1) -k2 = GPy.kern.Matern32(1) -k3 = GPy.kern.white(1) - -k = k1 + k2 + k3 -print k - -k.constrain_positive('var') -k.constrain_fixed(np.array([1]),1.75) -k.tie_param('len') -k.unconstrain('white') -k.constrain_bounded('white',lower=1e-5,upper=.5) -print k - -k_cst = GPy.kern.bias(1,variance=1.) -k_mat = GPy.kern.Matern52(1,variance=1., lengthscale=3) -Kanova = (k_cst + k_mat).prod_orthogonal(k_cst + k_mat) -print Kanova - -# sample inputs and outputs -X = np.random.uniform(-3.,3.,(40,2)) -Y = 0.5*X[:,:1] + 0.5*X[:,1:] + 2*np.sin(X[:,:1]) * np.sin(X[:,1:]) - -# Create GP regression model -m = GPy.models.GP_regression(X,Y,Kanova) -pb.figure(figsize=(5,5)) -m.plot() - -pb.figure(figsize=(20,3)) -pb.subplots_adjust(wspace=0.5) -pb.subplot(1,5,1) -m.plot() -pb.subplot(1,5,2) -pb.ylabel("= ",rotation='horizontal',fontsize='30') -pb.subplot(1,5,3) -m.plot(which_functions=[False,True,False,False]) -pb.ylabel("cst +",rotation='horizontal',fontsize='30') -pb.subplot(1,5,4) -m.plot(which_functions=[False,False,True,False]) -pb.ylabel("+ ",rotation='horizontal',fontsize='30') -pb.subplot(1,5,5) -pb.ylabel("+ ",rotation='horizontal',fontsize='30') -m.plot(which_functions=[False,False,False,True]) - -import pylab as pb -import numpy as np -import GPy -pb.ion() - -ker1 = GPy.kern.rbf(D=1) # Equivalent to ker1 = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) -ker2 = GPy.kern.rbf(D=1, variance = .75, lengthscale=3.) -ker3 = GPy.kern.rbf(1, .5, .25) - -ker1.plot() -ker2.plot() -ker3.plot() -#pb.savefig("Figures/tuto_kern_overview_basicdef.png") - -kernels = [GPy.kern.rbf(1), GPy.kern.exponential(1), GPy.kern.Matern32(1), GPy.kern.Matern52(1), GPy.kern.Brownian(1), GPy.kern.bias(1), GPy.kern.linear(1), GPy.kern.spline(1), GPy.kern.periodic_exponential(1), GPy.kern.periodic_Matern32(1), GPy.kern.periodic_Matern52(1), GPy.kern.white(1)] -kernel_names = ["GPy.kern.rbf", "GPy.kern.exponential", "GPy.kern.Matern32", "GPy.kern.Matern52", "GPy.kern.Brownian", "GPy.kern.bias", "GPy.kern.linear", "GPy.kern.spline", "GPy.kern.periodic_exponential", "GPy.kern.periodic_Matern32", "GPy.kern.periodic_Matern52", "GPy.kern.white"] - -pb.figure(figsize=(16,12)) -pb.subplots_adjust(wspace=.5, hspace=.5) -for i, kern in enumerate(kernels): - pb.subplot(3,4,i+1) - kern.plot(x=7.5,plot_limits=[0.00001,15.]) - pb.title(kernel_names[i]+ '\n') - -# actual plot for the noise -i = 11 -X = np.linspace(0.,15.,201) -WN = 0*X -WN[100] = 1. -pb.subplot(3,4,i+1) -pb.plot(X,WN,'b') diff --git a/GPy/examples/tutorials.py b/GPy/examples/tutorials.py new file mode 100644 index 00000000..be550e01 --- /dev/null +++ b/GPy/examples/tutorials.py @@ -0,0 +1,201 @@ +# Copyright (c) 2012, GPy authors (see AUTHORS.txt). +# Licensed under the BSD 3-clause license (see LICENSE.txt) + + +""" +Code of Tutorials +""" + +def tuto_GP_regression(): + """The detailed explanations of the commands used in this file can be found in the tutorial section""" + + import pylab as pb + pb.ion() + import numpy as np + import GPy + + X = np.random.uniform(-3.,3.,(20,1)) + Y = np.sin(X) + np.random.randn(20,1)*0.05 + + kernel = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) + + m = GPy.models.GP_regression(X,Y,kernel) + + print m + m.plot() + + m.constrain_positive('') + + m.unconstrain('') # Required to remove the previous constrains + m.constrain_positive('rbf_variance') + m.constrain_bounded('lengthscale',1.,10. ) + m.constrain_fixed('noise',0.0025) + + m.optimize() + + m.optimize_restarts(Nrestarts = 10) + + ########################### + # 2-dimensional example # + ########################### + + import pylab as pb + pb.ion() + import numpy as np + import GPy + + # sample inputs and outputs + X = np.random.uniform(-3.,3.,(50,2)) + Y = np.sin(X[:,0:1]) * np.sin(X[:,1:2])+np.random.randn(50,1)*0.05 + + # define kernel + ker = GPy.kern.Matern52(2,ARD=True) + GPy.kern.white(2) + + # create simple GP model + m = GPy.models.GP_regression(X,Y,ker) + + # contrain all parameters to be positive + m.constrain_positive('') + + # optimize and plot + pb.figure() + m.optimize('tnc', max_f_eval = 1000) + + m.plot() + print(m) + + +def tuto_kernel_overview(): + """The detailed explanations of the commands used in this file can be found in the tutorial section""" + import pylab as pb + import numpy as np + import GPy + pb.ion() + + ker1 = GPy.kern.rbf(1) # Equivalent to ker1 = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) + ker2 = GPy.kern.rbf(D=1, variance = .75, lengthscale=2.) + ker3 = GPy.kern.rbf(1, .5, .5) + + print ker2 + ker1.plot() + ker2.plot() + ker3.plot() + + k1 = GPy.kern.rbf(1,1.,2.) + k2 = GPy.kern.Matern32(1, 0.5, 0.2) + + # Product of kernels + k_prod = k1.prod(k2) + k_prodorth = k1.prod_orthogonal(k2) + + # Sum of kernels + k_add = k1.add(k2) + k_addorth = k1.add_orthogonal(k2) + + pb.figure(figsize=(8,8)) + pb.subplot(2,2,1) + k_prod.plot() + pb.title('prod') + pb.subplot(2,2,2) + k_prodorth.plot() + pb.title('prod_orthogonal') + pb.subplot(2,2,3) + k_add.plot() + pb.title('add') + pb.subplot(2,2,4) + k_addorth.plot() + pb.title('add_orthogonal') + pb.subplots_adjust(wspace=0.3, hspace=0.3) + + k1 = GPy.kern.rbf(1,1.,2) + k2 = GPy.kern.periodic_Matern52(1,variance=1e3, lengthscale=1, period = 1.5, lower=-5., upper = 5) + + k = k1 * k2 # equivalent to k = k1.prod(k2) + print k + + # Simulate sample paths + X = np.linspace(-5,5,501)[:,None] + Y = np.random.multivariate_normal(np.zeros(501),k.K(X),1) + + # plot + pb.figure(figsize=(10,4)) + pb.subplot(1,2,1) + k.plot() + pb.subplot(1,2,2) + pb.plot(X,Y.T) + pb.ylabel("Sample path") + pb.subplots_adjust(wspace=0.3) + + k = (k1+k2)*(k1+k2) + print k.parts[0].name, '\n', k.parts[1].name, '\n', k.parts[2].name, '\n', k.parts[3].name + + k1 = GPy.kern.rbf(1) + k2 = GPy.kern.Matern32(1) + k3 = GPy.kern.white(1) + + k = k1 + k2 + k3 + print k + + k.constrain_positive('var') + k.constrain_fixed(np.array([1]),1.75) + k.tie_param('len') + k.unconstrain('white') + k.constrain_bounded('white',lower=1e-5,upper=.5) + print k + + k_cst = GPy.kern.bias(1,variance=1.) + k_mat = GPy.kern.Matern52(1,variance=1., lengthscale=3) + Kanova = (k_cst + k_mat).prod_orthogonal(k_cst + k_mat) + print Kanova + + # sample inputs and outputs + X = np.random.uniform(-3.,3.,(40,2)) + Y = 0.5*X[:,:1] + 0.5*X[:,1:] + 2*np.sin(X[:,:1]) * np.sin(X[:,1:]) + + # Create GP regression model + m = GPy.models.GP_regression(X,Y,Kanova) + pb.figure(figsize=(5,5)) + m.plot() + + pb.figure(figsize=(20,3)) + pb.subplots_adjust(wspace=0.5) + pb.subplot(1,5,1) + m.plot() + pb.subplot(1,5,2) + pb.ylabel("= ",rotation='horizontal',fontsize='30') + pb.subplot(1,5,3) + m.plot(which_functions=[False,True,False,False]) + pb.ylabel("cst +",rotation='horizontal',fontsize='30') + pb.subplot(1,5,4) + m.plot(which_functions=[False,False,True,False]) + pb.ylabel("+ ",rotation='horizontal',fontsize='30') + pb.subplot(1,5,5) + pb.ylabel("+ ",rotation='horizontal',fontsize='30') + m.plot(which_functions=[False,False,False,True]) + + ker1 = GPy.kern.rbf(D=1) # Equivalent to ker1 = GPy.kern.rbf(D=1, variance=1., lengthscale=1.) + ker2 = GPy.kern.rbf(D=1, variance = .75, lengthscale=3.) + ker3 = GPy.kern.rbf(1, .5, .25) + + ker1.plot() + ker2.plot() + ker3.plot() + #pb.savefig("Figures/tuto_kern_overview_basicdef.png") + + kernels = [GPy.kern.rbf(1), GPy.kern.exponential(1), GPy.kern.Matern32(1), GPy.kern.Matern52(1), GPy.kern.Brownian(1), GPy.kern.bias(1), GPy.kern.linear(1), GPy.kern.spline(1), GPy.kern.periodic_exponential(1), GPy.kern.periodic_Matern32(1), GPy.kern.periodic_Matern52(1), GPy.kern.white(1)] + kernel_names = ["GPy.kern.rbf", "GPy.kern.exponential", "GPy.kern.Matern32", "GPy.kern.Matern52", "GPy.kern.Brownian", "GPy.kern.bias", "GPy.kern.linear", "GPy.kern.spline", "GPy.kern.periodic_exponential", "GPy.kern.periodic_Matern32", "GPy.kern.periodic_Matern52", "GPy.kern.white"] + + pb.figure(figsize=(16,12)) + pb.subplots_adjust(wspace=.5, hspace=.5) + for i, kern in enumerate(kernels): + pb.subplot(3,4,i+1) + kern.plot(x=7.5,plot_limits=[0.00001,15.]) + pb.title(kernel_names[i]+ '\n') + + # actual plot for the noise + i = 11 + X = np.linspace(0.,15.,201) + WN = 0*X + WN[100] = 1. + pb.subplot(3,4,i+1) + pb.plot(X,WN,'b') diff --git a/GPy/kern/kern.py b/GPy/kern/kern.py index f1a5bd45..87e67f33 100644 --- a/GPy/kern/kern.py +++ b/GPy/kern/kern.py @@ -399,7 +399,7 @@ class kern(parameterised): return target - def dpsi2_dtheta(self,dL_dpsi2,partial1,Z,mu,S,slices1=None,slices2=None): + def dpsi2_dtheta(self,dL_dpsi2,Z,mu,S,slices1=None,slices2=None): """Returns shape (N,M,M,Ntheta)""" slices1, slices2 = self._process_slices(slices1,slices2) target = np.zeros(self.Nparam) diff --git a/GPy/models/sparse_GP.py b/GPy/models/sparse_GP.py index acf4f6c0..f1439f76 100644 --- a/GPy/models/sparse_GP.py +++ b/GPy/models/sparse_GP.py @@ -208,7 +208,7 @@ class sparse_GP(GP): if self.has_uncertain_inputs: dL_dtheta += self.kern.dpsi0_dtheta(self.dL_dpsi0, self.Z,self.X,self.X_uncertainty) dL_dtheta += self.kern.dpsi1_dtheta(self.dL_dpsi1.T,self.Z,self.X, self.X_uncertainty) - dL_dtheta += self.kern.dpsi2_dtheta(self.dL_dpsi2,self.dL_dpsi1.T, self.Z,self.X, self.X_uncertainty) + dL_dtheta += self.kern.dpsi2_dtheta(self.dL_dpsi2, self.Z,self.X, self.X_uncertainty) else: dL_dtheta += self.kern.dK_dtheta(self.dL_dpsi1,self.Z,self.X) dL_dtheta += self.kern.dKdiag_dtheta(self.dL_dpsi0, self.X) diff --git a/GPy/testing/__init__.py b/GPy/testing/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/GPy/testing/bgplvm_tests.py b/GPy/testing/bgplvm_tests.py index c49bdfda..e3bd2b36 100644 --- a/GPy/testing/bgplvm_tests.py +++ b/GPy/testing/bgplvm_tests.py @@ -12,6 +12,7 @@ class BGPLVMTests(unittest.TestCase): k = GPy.kern.rbf(Q) + GPy.kern.white(Q, 0.00001) K = k.K(X) Y = np.random.multivariate_normal(np.zeros(N),K,D).T + Y -= Y.mean(axis=0) k = GPy.kern.bias(Q) + GPy.kern.white(Q, 0.00001) m = GPy.models.Bayesian_GPLVM(Y, Q, kernel = k, M=M) m.constrain_positive('(rbf|bias|noise|white|S)') @@ -24,6 +25,7 @@ class BGPLVMTests(unittest.TestCase): k = GPy.kern.rbf(Q) + GPy.kern.white(Q, 0.00001) K = k.K(X) Y = np.random.multivariate_normal(np.zeros(N),K,D).T + Y -= Y.mean(axis=0) k = GPy.kern.linear(Q) + GPy.kern.white(Q, 0.00001) m = GPy.models.Bayesian_GPLVM(Y, Q, kernel = k, M=M) m.constrain_positive('(linear|bias|noise|white|S)') @@ -36,13 +38,14 @@ class BGPLVMTests(unittest.TestCase): k = GPy.kern.rbf(Q) + GPy.kern.white(Q, 0.00001) K = k.K(X) Y = np.random.multivariate_normal(np.zeros(N),K,D).T + Y -= Y.mean(axis=0) k = GPy.kern.rbf(Q) + GPy.kern.white(Q, 0.00001) m = GPy.models.Bayesian_GPLVM(Y, Q, kernel = k, M=M) m.constrain_positive('(rbf|bias|noise|white|S)') m.randomize() self.assertTrue(m.checkgrad()) - + if __name__ == "__main__": print "Running unit tests, please be (very) patient..." unittest.main() diff --git a/GPy/testing/kernel_tests.py b/GPy/testing/kernel_tests.py index 3d738106..bb809ea6 100644 --- a/GPy/testing/kernel_tests.py +++ b/GPy/testing/kernel_tests.py @@ -13,7 +13,6 @@ class KernelTests(unittest.TestCase): X = np.random.rand(5,5) Y = np.ones((5,1)) m = GPy.models.GP_regression(X,Y,K) - print m self.assertTrue(m.checkgrad()) def test_coregionalisation(self): diff --git a/GPy/testing/unit_tests.py b/GPy/testing/unit_tests.py index 5ec1d766..55a1fb65 100644 --- a/GPy/testing/unit_tests.py +++ b/GPy/testing/unit_tests.py @@ -192,17 +192,6 @@ class GradientTests(unittest.TestCase): m.approximate_likelihood() self.assertTrue(m.checkgrad()) - def test_warped_GP(self): - xmin, xmax = 1, 2.5*np.pi - b, C, SNR = 1, 0, 0.1 - X = np.linspace(xmin, xmax, 500) - y = b*X + C + 1*np.sin(X) - y += 0.05*np.random.randn(len(X)) - X, y = X[:, None], y[:, None] - m = GPy.models.warpedGP(X, y, warping_terms = 3) - m.constrain_positive('(tanh_a|tanh_b|rbf|white|bias)') - self.assertTrue(m.checkgrad()) - if __name__ == "__main__": print "Running unit tests, please be (very) patient..." diff --git a/doc/Figures/tick.png b/doc/Figures/tick.png new file mode 100644 index 00000000..1175c802 Binary files /dev/null and b/doc/Figures/tick.png differ diff --git a/doc/GPy.examples.rst b/doc/GPy.examples.rst index 59ffd43d..ec283d21 100644 --- a/doc/GPy.examples.rst +++ b/doc/GPy.examples.rst @@ -73,6 +73,22 @@ examples Package :undoc-members: :show-inheritance: +:mod:`tuto_GP_regression` Module +-------------------------------- + +.. automodule:: GPy.examples.tuto_GP_regression + :members: + :undoc-members: + :show-inheritance: + +:mod:`tuto_kernel_overview` Module +---------------------------------- + +.. automodule:: GPy.examples.tuto_kernel_overview + :members: + :undoc-members: + :show-inheritance: + :mod:`uncertain_input_GP_regression_demo` Module ------------------------------------------------ diff --git a/doc/GPy.kern.rst b/doc/GPy.kern.rst index a3a611b7..3ebeda40 100644 --- a/doc/GPy.kern.rst +++ b/doc/GPy.kern.rst @@ -49,6 +49,14 @@ kern Package :undoc-members: :show-inheritance: +:mod:`coregionalise` Module +--------------------------- + +.. automodule:: GPy.kern.coregionalise + :members: + :undoc-members: + :show-inheritance: + :mod:`exponential` Module ------------------------- @@ -113,18 +121,18 @@ kern Package :undoc-members: :show-inheritance: -:mod:`product` Module ---------------------- +:mod:`prod` Module +------------------ -.. automodule:: GPy.kern.product +.. automodule:: GPy.kern.prod :members: :undoc-members: :show-inheritance: -:mod:`product_orthogonal` Module --------------------------------- +:mod:`prod_orthogonal` Module +----------------------------- -.. automodule:: GPy.kern.product_orthogonal +.. automodule:: GPy.kern.prod_orthogonal :members: :undoc-members: :show-inheritance: @@ -145,6 +153,14 @@ kern Package :undoc-members: :show-inheritance: +:mod:`symmetric` Module +----------------------- + +.. automodule:: GPy.kern.symmetric + :members: + :undoc-members: + :show-inheritance: + :mod:`sympykern` Module ----------------------- diff --git a/doc/kernel_implementation.rst b/doc/kernel_implementation.rst index 57b37c8e..99ee006b 100644 --- a/doc/kernel_implementation.rst +++ b/doc/kernel_implementation.rst @@ -3,15 +3,45 @@ List of implemented kernels *************************** -The :math:`\checkmark` symbol represents the functions that have been implemented for each kernel. +The following table shows the implemented kernels in GPy and gives the details of the implemented function for each kernel. -.. |tick| +==================== =========== ====== ======= =========== =============== ======= =========== ====== ====== ======= +NAME get/set K Kdiag dK_dtheta dKdiag_dtheta dK_dX dKdiag_dX psi0 psi1 psi2 +==================== =========== ====== ======= =========== =============== ======= =========== ====== ====== ======= +bias |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +Brownian |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +exponential |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +finite_dimensional |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +linear |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +Matern32 |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +Matern52 |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +periodic_exponential |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +periodic_Matern32 |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +periodic_Matern52 |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +rbf |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +spline |tick| |tick| |tick| |tick| |tick| |tick| +-------------------- ----------- ------ ------- ----------- --------------- ------- ----------- ------ ------ ------- +white |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| |tick| +==================== =========== ====== ======= =========== =============== ======= =========== ====== ====== ======= -.. |tick| image:: tick.png +Depending on the use, all functions may not be required + * ``get/set, K, Kdiag``: compulsory + * ``dK_dtheta``: necessary to optimize the model + * ``dKdiag_dtheta``: sparse models, BGPLVM, GPs with uncertain inputs + * ``dK_dX``: sparse models, GPLVM, BGPLVM, GPs with uncertain inputs + * ``dKdiag_dX``: sparse models, BGPLVM, GPs with uncertain inputs + * ``psi0, psi1, psi2``: BGPLVM, GPs with uncertain inputs -====== =========== === ======= =========== =============== ======= =========== ====== ====== ======= - NAME get/set K Kdiag dK_dtheta dKdiag_dtheta dK_dX dKdiag_dX psi0 psi1 psi2 -====== =========== === ======= =========== =============== ======= =========== ====== ====== ======= -rbf \\checkmark y -====== =========== === ======= =========== =============== ======= =========== ====== ====== ======= +.. |tick| image:: Figures/tick.png diff --git a/doc/tuto_GP_regression.rst b/doc/tuto_GP_regression.rst index 9de79a8c..24e10528 100644 --- a/doc/tuto_GP_regression.rst +++ b/doc/tuto_GP_regression.rst @@ -2,7 +2,7 @@ Gaussian process regression tutorial ************************************* -We will see in this tutorial the basics for building a 1 dimensional and a 2 dimensional Gaussian process regression model, also known as a kriging model. The code shown in this tutorial can be found without the comments at GPy/examples/tuto_GP_regression.py. +We will see in this tutorial the basics for building a 1 dimensional and a 2 dimensional Gaussian process regression model, also known as a kriging model. The code shown in this tutorial can be obtained at GPy/examples/tutorials.py, or by running ``GPy.examples.tutorials.tuto_GP_regression()``. We first import the libraries we will need: :: diff --git a/doc/tuto_kernel_overview.rst b/doc/tuto_kernel_overview.rst index c420943b..dfb7fb3f 100644 --- a/doc/tuto_kernel_overview.rst +++ b/doc/tuto_kernel_overview.rst @@ -2,7 +2,7 @@ **************************** tutorial : A kernel overview **************************** -The aim of this tutorial is to give a better understanding of the kernel objects in GPy and to list the ones that are already implemented. The code shown in this tutorial can be found without the comments at GPy/examples/tuto_kernel_overview.py. +The aim of this tutorial is to give a better understanding of the kernel objects in GPy and to list the ones that are already implemented. The code shown in this tutorial can be obtained at GPy/examples/tutorials.py or by running ``GPy.examples.tutorials.tuto_kernel_overview()``. First we import the libraries we will need :: @@ -39,7 +39,7 @@ return:: Implemented kernels =================== -Many kernels are already implemented in GPy. A comprehensive list can be found `here `_ . The following figure gives a summary of most of them: +Many kernels are already implemented in GPy. A comprehensive list can be found `here `_ and the following figure gives a summary of most of them: .. figure:: Figures/tuto_kern_overview_allkern.png :align: center diff --git a/setup.py b/setup.py index d24171e2..b701b74d 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,6 @@ import os from setuptools import setup -#from numpy.distutils.core import Extension, setup -#from sphinx.setup_command import BuildDoc # Version number version = '0.1.3' @@ -14,12 +12,12 @@ def read(fname): setup(name = 'GPy', version = version, - author = 'James Hensman, Nicolo Fusi, Ricardo Andrade, Nicolas Durrande, Alan Saul, Neil D. Lawrence', + author = read('AUTHORS.txt'), author_email = "james.hensman@gmail.com", description = ("The Gaussian Process Toolbox"), license = "BSD 3-clause", keywords = "machine-learning gaussian-processes kernels", - url = "http://ml.sheffield.ac.uk/GPy/", + url = "http://sheffieldml.github.com/GPy/", packages = ['GPy', 'GPy.core', 'GPy.kern', 'GPy.util', 'GPy.models', 'GPy.inference', 'GPy.examples', 'GPy.likelihoods'], package_dir={'GPy': 'GPy'}, package_data = {'GPy': ['GPy/examples']},