mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-04 01:02:39 +02:00
general changes to bebugging code
This commit is contained in:
parent
a6300fab10
commit
9f05744374
3 changed files with 29 additions and 18 deletions
|
|
@ -63,8 +63,8 @@ def jitchol(A,maxtries=5):
|
|||
raise linalg.LinAlgError, "not pd: negative diagonal elements"
|
||||
jitter= diagA.mean()*1e-6
|
||||
for i in range(1,maxtries+1):
|
||||
print 'Warning: adding jitter of '+str(jitter)
|
||||
try:
|
||||
print 'Warning: adding jitter of '+str(jitter)
|
||||
return linalg.cholesky(A+np.eye(A.shape[0])*jitter, lower = True)
|
||||
except:
|
||||
jitter *= 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue