class_docstr: Compare gp.LatentKron to gp.Latent, both with Gaussian noise.
class_docstr_tok: ["Compare","gp.LatentKron","to","gp.Latent",",","both","with","Gaussian","noise","."]
code: def setup_method(self):
      rng = np.random.default_rng(20221125)
      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 = (
          rng.standard_normal(size=(5, 1)),
          rng.standard_normal(size=(5, 1)),
          rng.standard_normal(size=(5, 1)),
      )
      self.Xnew = np.concatenate(self.Xnews, axis=1)
      self.pnew = rng.standard_normal(size=(len(self.Xnew),))
      ls = 0.2
      with pm.Model() as latent_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.Latent(mean_func=self.mean, cov_func=cov_func)
          f = gp.prior("f", self.X)
          p = gp.conditional("p", self.Xnew)
      chol = np.linalg.cholesky(cov_func(self.X).eval())
      self.y_rotated = np.linalg.solve(chol, self.y - 0.5)
      self.logp = latent_model.compile_logp()(
          {"f_rotated_": self.y_rotated, "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 TestLatentKron obj's underlying member method code with example usage: obj.setup_method() without return types