Merge branch 'devel' of github.com:SheffieldML/GPy into devel

This commit is contained in:
Max Zwiessele 2013-11-27 12:38:19 +00:00
commit c0be7ae4e2
3 changed files with 29 additions and 1 deletions

View file

@ -861,12 +861,15 @@ def kern_test(kern, X=None, X2=None, output_ind=None, verbose=False, X_positive=
if X_positive: if X_positive:
X = abs(X) X = abs(X)
if output_ind is not None: if output_ind is not None:
assert(output_ind<kern.input_dim)
X[:, output_ind] = np.random.randint(low=0,high=kern.parts[0].output_dim, size=X.shape[0]) X[:, output_ind] = np.random.randint(low=0,high=kern.parts[0].output_dim, size=X.shape[0])
import ipdb; ipdb.set_trace()
if X2==None: if X2==None:
X2 = np.random.randn(20, kern.input_dim) X2 = np.random.randn(20, kern.input_dim)
if X_positive: if X_positive:
X2 = abs(X2) X2 = abs(X2)
if output_ind is not None: if output_ind is not None:
assert(output_ind<kern.input_dim)
X2[:, output_ind] = np.random.randint(low=0, high=kern.parts[0].output_dim, size=X2.shape[0]) X2[:, output_ind] = np.random.randint(low=0, high=kern.parts[0].output_dim, size=X2.shape[0])
if verbose: if verbose:

View file

@ -36,7 +36,7 @@ class KernelTests(unittest.TestCase):
def test_eq_sympykernel(self): def test_eq_sympykernel(self):
if SYMPY_AVAILABLE: if SYMPY_AVAILABLE:
kern = GPy.kern.eq_sympy(5, 3) kern = GPy.kern.eq_sympy(5, 3)
self.assertTrue(GPy.kern.kern_test(kern, output_ind=3, verbose=verbose)) self.assertTrue(GPy.kern.kern_test(kern, output_ind=4, verbose=verbose))
def test_ode1_eqkernel(self): def test_ode1_eqkernel(self):
if SYMPY_AVAILABLE: if SYMPY_AVAILABLE:

View file

@ -9,6 +9,31 @@ A Gaussian processes framework in Python.
Continuous integration status: ![CI status](https://travis-ci.org/SheffieldML/GPy.png) Continuous integration status: ![CI status](https://travis-ci.org/SheffieldML/GPy.png)
Getting started
===============
Installing with pip
-------------------
The simplest way to install GPy is using pip.
pip install gpy
Ubuntu
------
For the most part, the developers are using ubuntu. To install the required packages:
sudo apt-get install python-numpy python-scipy python-matplotlib
clone this git repository and add it to your path:
git clone git@github.com:SheffieldML/GPy.git \<destination\>
echo "PYTHONPATH=$PYTHONPATH:\<detination\> > ~/.bashrc
Windows
-------
On windows, we recommend the ![anaconda python distribution](http://continuum.io/downloads). We've also had luck with ![enthought](http://www.enthought.com). git clone or unzip the source to a suitable directory, and add a PYTHONPATH environement variable.
OSX
---
everything appears to work out-of-the box using ![enthought](http://www.enthought.com) on osx Mavericks.
Compiling documentation: Compiling documentation:
======================== ========================