mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
kernel adding now takes over constraints
This commit is contained in:
parent
b7312a1b99
commit
4cfc13d5fc
4 changed files with 9 additions and 12 deletions
|
|
@ -6,6 +6,7 @@ from ...util.linalg import jitchol, backsub_both_sides, tdot, dtrtrs, dpotri, sy
|
|||
import numpy as np
|
||||
from ...util.linalg import dtrtri
|
||||
from ...util.caching import Cacher
|
||||
from ...util.misc import param_to_array
|
||||
log_2_pi = np.log(2*np.pi)
|
||||
|
||||
class VarDTC(object):
|
||||
|
|
@ -25,7 +26,7 @@ class VarDTC(object):
|
|||
self.get_YYTfactor = Cacher(self._get_YYTfactor, 1)
|
||||
|
||||
def _get_trYYT(self, Y):
|
||||
return np.sum(np.square(Y))
|
||||
return param_to_array(np.sum(np.square(Y)))
|
||||
|
||||
def _get_YYTfactor(self, Y):
|
||||
"""
|
||||
|
|
@ -35,7 +36,7 @@ class VarDTC(object):
|
|||
"""
|
||||
N, D = Y.shape
|
||||
if (N>D):
|
||||
return Y
|
||||
return param_to_array(Y)
|
||||
else:
|
||||
return jitchol(tdot(Y))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue