From 87faf96defcb6e6dc8509db4019155b79e5ec8f5 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Wed, 30 Sep 2015 08:22:32 +0100 Subject: [PATCH] [sparsegp] check for missing data --- GPy/core/sparse_gp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPy/core/sparse_gp.py b/GPy/core/sparse_gp.py index 56400d91..306d06e8 100644 --- a/GPy/core/sparse_gp.py +++ b/GPy/core/sparse_gp.py @@ -42,6 +42,9 @@ class SparseGP(GP): def __init__(self, X, Y, Z, kernel, likelihood, mean_function=None, X_variance=None, inference_method=None, name='sparse gp', Y_metadata=None, normalizer=False): + + self.missing_data = np.isnan(Y).any() + #pick a sensible inference method if inference_method is None: if isinstance(likelihood, likelihoods.Gaussian):