class_docstr: Compare gp.MarginalKron to gp.Marginal.
class_docstr_tok: ["Compare","gp.MarginalKron","to","gp.Marginal","."]
code: def setup_method(self):
      self.Xs = [
          np.linspace(0, 1, 7)[:, None],
          np.linspace(0, 1, 5)[:, None],
          np.linspace(0, 1, 6)[:, None],
      ]
      self.X = cartesian(*self.Xs)
      self.N = np.prod([len(X) for X in self.Xs])
      self.y = np.random.randn(self.N) * 0.1
      self.Xnews = (
          np.random.randn(5, 1),
          np.random.randn(5, 1),
          np.random.randn(5, 1),
      )
      self.Xnew = np.concatenate(self.Xnews, axis=1)
      self.sigma = 0.2
      self.pnew = np.random.randn(len(self.Xnew))
  
      ls = 0.2
      with pm.Model() as model:
          self.cov_funcs = [
              pm.gp.cov.ExpQuad(1, ls),
              pm.gp.cov.ExpQuad(1, ls),
              pm.gp.cov.ExpQuad(1, ls),
          ]
          cov_func = pm.gp.cov.Kron(self.cov_funcs)
          self.mean = pm.gp.mean.Constant(0.5)
          gp = pm.gp.Marginal(mean_func=self.mean, cov_func=cov_func)
          f = gp.marginal_likelihood(
              "f", self.X, self.y, sigma=self.sigma
          )
          p = gp.conditional("p", self.Xnew)
          self.mu, self.cov = gp.predict(self.Xnew)
      self.logp = model.compile_logp()({"p": self.pnew})
  
imports: from functools import reduce
  from operator import add
  import numpy
  import numpy.testing
  import pytest
  import pymc
  from pymc.math import cartesian
label_desc: Use image node_id 1 for calling the TestMarginalKron obj's underlying member method code with example usage: obj.setup_method() without return types