fixed small bugs in linalg, setup.py

This commit is contained in:
James Hensman 2012-12-06 10:16:19 -08:00
parent c72d1b1a5b
commit f634350398
2 changed files with 8 additions and 13 deletions

View file

@ -46,16 +46,11 @@ def _mdot_r(a,b):
def jitchol(A,maxtries=5): def jitchol(A,maxtries=5):
""" """
Arguments :param A : An almost pd square matrix
---------
A : An almost pd square matrix
Returns :rval L: the Cholesky decomposition of A
-------
cholesky(K)
Notes .. Note:
-----
Adds jitter to K, to enforce positive-definiteness Adds jitter to K, to enforce positive-definiteness
if stuff breaks, please check: if stuff breaks, please check:
np.allclose(sp.linalg.cholesky(XXT, lower = True), np.triu(sp.linalg.cho_factor(XXT)[0]).T) np.allclose(sp.linalg.cholesky(XXT, lower = True), np.triu(sp.linalg.cho_factor(XXT)[0]).T)
@ -139,7 +134,7 @@ def PCA(Y, Q):
Returns Returns
------- -------
X - NxQ np.array of dimensionality reduced data :rval X: - NxQ np.array of dimensionality reduced data
W - QxD mapping from X to Y W - QxD mapping from X to Y
""" """
if not np.allclose(Y.mean(axis=0), 0.0): if not np.allclose(Y.mean(axis=0), 0.0):

View file

@ -23,7 +23,7 @@ setup(name = 'GPy',
package_dir={'GPy': 'GPy'}, package_dir={'GPy': 'GPy'},
package_data = {'GPy': ['GPy/examples']}, package_data = {'GPy': ['GPy/examples']},
py_modules = ['GPy.__init__'], py_modules = ['GPy.__init__'],
long_description=read('README'), long_description=read('README.md'),
ext_modules = [Extension(name = 'GPy.kern.lfmUpsilonf2py', ext_modules = [Extension(name = 'GPy.kern.lfmUpsilonf2py',
sources = ['GPy/kern/src/lfmUpsilonf2py.f90'])], sources = ['GPy/kern/src/lfmUpsilonf2py.f90'])],
install_requires=['numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1'], install_requires=['numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1'],