mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 19:42:39 +02:00
fixed small bugs in linalg, setup.py
This commit is contained in:
parent
c72d1b1a5b
commit
f634350398
2 changed files with 8 additions and 13 deletions
|
|
@ -46,19 +46,14 @@ 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)
|
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return linalg.cholesky(A, lower = True)
|
return linalg.cholesky(A, lower = True)
|
||||||
|
|
@ -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):
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -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'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue