minor changes bits and pieces

This commit is contained in:
Max Zwiessele 2014-03-31 14:12:13 +01:00
parent 5ca56d907c
commit 439d66b67f
3 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ class ParametersChangedMeta(type):
instance.parameters_changed()
return instance
class Parameterized(Parameterizable, Pickleable):
class Parameterized(Parameterizable):
"""
Parameterized class

View file

@ -29,7 +29,6 @@ class ExactGaussianInference(object):
"""
N, D = Y.shape
if (N>D):
print "WARNING: D>N we still need caching of L, such that L*L^T = Y, although fine here"
return Y
else:
#if Y in self.cache, return self.Cache[Y], else store Y in cache and return L.

View file

@ -35,9 +35,11 @@ class VarDTC(object):
return param_to_array(np.sum(np.square(Y)))
def __getstate__(self):
# has to be overridden, as Cacher objects cannot be pickled.
return self.limit
def __setstate__(self, state):
# has to be overridden, as Cacher objects cannot be pickled.
self.limit = state
from ...util.caching import Cacher
self.get_trYYT = Cacher(self._get_trYYT, self.limit)