class_docstr: Compare the logp of models Marginal, sigma=0 and Latent.
class_docstr_tok: ["Compare","the","logp","of","models","Marginal",",","sigma=0","and","Latent","."]
code: def setup_method(self):
      X = np.random.randn(20, 3)
      y = np.random.randn(20)
      Xnew = np.random.randn(30, 3)
      pnew = np.random.randn(30)
      with pm.Model() as model:
          cov_func = pm.gp.cov.ExpQuad(3, [0.1, 0.2, 0.3])
          mean_func = pm.gp.mean.Constant(0.5)
          gp = pm.gp.Marginal(mean_func=mean_func, cov_func=cov_func)
          f = gp.marginal_likelihood("f", X, y, sigma=0.0)
          p = gp.conditional("p", Xnew)
      self.logp = model.compile_logp()({"p": pnew})
      self.X = X
      self.Xnew = Xnew
      self.y = y
      self.pnew = 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 TestMarginalVsLatent obj's underlying member method code with example usage: obj.setup_method() without return types