Skip to content

Instantly share code, notes, and snippets.

@jamesmcm
Created June 30, 2014 09:55
Show Gist options
  • Select an option

  • Save jamesmcm/4b69149b1f6fc2cf5925 to your computer and use it in GitHub Desktop.

Select an option

Save jamesmcm/4b69149b1f6fc2cf5925 to your computer and use it in GitHub Desktop.
caching missing data slices, this can take several minutes...
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-19-4ef20cdf8256> in <module>()
34 likelihood = GPy.likelihoods.gaussian.Gaussian()
35
---> 36 m=GPy.core.SparseGP(X, Y, Z, k, likelihood, inference_method=VarDTCMissingData(inan=inan))
37 #GPy.core.GP?
38 #m=GPy.core.GP(X, Y, k, likelihood, inference_method=VarDTCMissingData(inan=inan))
/is/ei/jmcmurr/.local/lib/python2.7/site-packages/GPy-0.4.6-py2.7.egg/GPy/core/parameterization/parameterized.pyc in __call__(self, *args, **kw)
12 def __call__(self, *args, **kw):
13 instance = super(ParametersChangedMeta, self).__call__(*args, **kw)
---> 14 instance.parameters_changed()
15 return instance
16
/is/ei/jmcmurr/.local/lib/python2.7/site-packages/GPy-0.4.6-py2.7.egg/GPy/core/sparse_gp.pyc in parameters_changed(self)
54
55 def parameters_changed(self):
---> 56 self.posterior, self._log_marginal_likelihood, self.grad_dict = self.inference_method.inference(self.kern, self.X, self.Z, self.likelihood, self.Y, self.Y_metadata)
57 self.likelihood.update_gradients(self.grad_dict['dL_dthetaL'])
58 if isinstance(self.X, VariationalPosterior):
/is/ei/jmcmurr/.local/lib/python2.7/site-packages/GPy-0.4.6-py2.7.egg/GPy/inference/latent_function_inference/var_dtc.pyc in inference(self, kern, X, Z, likelihood, Y, Y_metadata)
258 psi2_all = None
259
--> 260 Ys, traces = self._Y(Y)
261 beta_all = 1./np.fmax(likelihood.gaussian_variance(Y_metadata), 1e-6)
262 het_noise = beta_all.size != 1
/is/ei/jmcmurr/.local/lib/python2.7/site-packages/GPy-0.4.6-py2.7.egg/GPy/util/caching.pyc in __call__(self, *args, **kw)
86 #=======================================================================
87 # !WARNING CACHE OFFSWITCH!
---> 88 return self.operation(*args, **kw)
89 #=======================================================================
90
/is/ei/jmcmurr/.local/lib/python2.7/site-packages/GPy-0.4.6-py2.7.egg/GPy/inference/latent_function_inference/var_dtc.pyc in _subarray_computations(self, Y)
238 self._subarray_indices.append([v,ind])
239 logger.info('preparing subarrays Y')
--> 240 Ys = [Y[v, :][:, ind] for v, ind in self._subarray_indices]
241 logger.info('preparing traces Y')
242 traces = [np.einsum('ij,ij->', y,y) for y in Ys]
IndexError: index (12) out of range (0<=index<0) in dimension 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment