mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 11:32:39 +02:00
minor changes bits and pieces
This commit is contained in:
parent
5ca56d907c
commit
439d66b67f
3 changed files with 3 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ class ParametersChangedMeta(type):
|
||||||
instance.parameters_changed()
|
instance.parameters_changed()
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
class Parameterized(Parameterizable, Pickleable):
|
class Parameterized(Parameterizable):
|
||||||
"""
|
"""
|
||||||
Parameterized class
|
Parameterized class
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ class ExactGaussianInference(object):
|
||||||
"""
|
"""
|
||||||
N, D = Y.shape
|
N, D = Y.shape
|
||||||
if (N>D):
|
if (N>D):
|
||||||
print "WARNING: D>N we still need caching of L, such that L*L^T = Y, although fine here"
|
|
||||||
return Y
|
return Y
|
||||||
else:
|
else:
|
||||||
#if Y in self.cache, return self.Cache[Y], else store Y in cache and return L.
|
#if Y in self.cache, return self.Cache[Y], else store Y in cache and return L.
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,11 @@ class VarDTC(object):
|
||||||
return param_to_array(np.sum(np.square(Y)))
|
return param_to_array(np.sum(np.square(Y)))
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
|
# has to be overridden, as Cacher objects cannot be pickled.
|
||||||
return self.limit
|
return self.limit
|
||||||
|
|
||||||
def __setstate__(self, state):
|
def __setstate__(self, state):
|
||||||
|
# has to be overridden, as Cacher objects cannot be pickled.
|
||||||
self.limit = state
|
self.limit = state
|
||||||
from ...util.caching import Cacher
|
from ...util.caching import Cacher
|
||||||
self.get_trYYT = Cacher(self._get_trYYT, self.limit)
|
self.get_trYYT = Cacher(self._get_trYYT, self.limit)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue