Merge branch 'params' of github.com:SheffieldML/GPy into params

This commit is contained in:
Ricardo 2014-04-17 15:28:13 +01:00
commit b6c4c39261
21 changed files with 955 additions and 587 deletions

View file

@ -192,17 +192,22 @@ class VarDTC(object):
class VarDTCMissingData(object):
const_jitter = 1e-6
def __init__(self, limit=1):
def __init__(self, limit=1, inan=None):
from ...util.caching import Cacher
self._Y = Cacher(self._subarray_computations, limit)
self._inan = inan
pass
def set_limit(self, limit):
self._Y.limit = limit
def _subarray_computations(self, Y):
inan = np.isnan(Y)
has_none = inan.any()
if self._inan is None:
inan = np.isnan(Y)
has_none = inan.any()
else:
inan = self._inan
has_none = True
if has_none:
from ...util.subarray_and_sorting import common_subarrays
self._subarray_indices = []