class_docstr: Tests for the default SMC kernel
class_docstr_tok: ["Tests","for","the","default","SMC","kernel"]
code: def setup_class(self):
      self.samples = 1000
      n = 4
      mu1 = np.ones(n) * 0.5
      mu2 = -mu1
  
      stdev = 0.1
      sigma = np.power(stdev, 2) * np.eye(n)
      isigma = np.linalg.inv(sigma)
      dsigma = np.linalg.det(sigma)
  
      w1 = stdev
      w2 = 1 - stdev
  
      def two_gaussians(x):
          """
          Mixture of gaussians likelihood
          """
          log_like1 = (
              -0.5 * n * pt.log(2 * np.pi)
              - 0.5 * pt.log(dsigma)
              - 0.5 * (x - mu1).T.dot(isigma).dot(x - mu1)
          )
          log_like2 = (
              -0.5 * n * pt.log(2 * np.pi)
              - 0.5 * pt.log(dsigma)
              - 0.5 * (x - mu2).T.dot(isigma).dot(x - mu2)
          )
          return pt.log(w1 * pt.exp(log_like1) + w2 * pt.exp(log_like2))
  
      with pm.Model() as self.SMC_test:
          X = pm.Uniform("X", lower=-2, upper=2.0, shape=n)
          llk = pm.Potential("muh", two_gaussians(X))
  
      self.muref = mu1
  
      with pm.Model() as self.fast_model:
          x = pm.Normal("x", 0, 1)
          y = pm.Normal("y", x, 1, observed=0)
  
imports: import logging
  import platform
  import warnings
  import numpy
  import pytensor.tensor
  import pytest
  import scipy.stats
  from arviz.data.inference_data import InferenceData
  import pymc
  from pymc.backends.base import MultiTrace
  from pymc.pytensorf import floatX
  from pymc.smc.kernels import IMH, systematic_resampling
  from tests.helpers import assert_random_state_equal
label_desc: Use image node_id 1 for calling the TestSMC obj's underlying member method code with example usage: obj.setup_class() and returns: pt