class_docstr: Basic tests for Kernel function 
class_docstr_tok: ["Basic","tests","for","Kernel","function"]
docstr: Sets up attributes. 
docstr_tok: ["Sets","up","attributes","."]
code: def setUp(self):
      """Sets up attributes."""
      # Data for generic tests
      self.num_data_1 = 2
      self.num_data_2 = 3
      self.dim = 3
      self.hyper_param_dict_1 = {
          "param_1": 1,
          "param_2": 2,
          "param_3": 3,
      }
      self.hyper_param_dict_2 = {
          "param_4": 4,
          "param_5": 5,
          "param_6": 6,
      }
      self.hyper_param_dict_3 = {
          "param_1": 1,
          "param_2": 2,
          "param_3": 3,
          "param_4": 4,
          "param_5": 5,
          "param_6": 6,
      }
      # Data for the SE and poly kernels
      self.se_scale = 2
      self.data_1 = np.array([[1, 2], [3, 4.5]])
      self.data_2 = np.array([[1, 2], [3, 4]])
      # Data for the squared exponential kernel.
      self.dim_bandwidths = [0.1, 1]
      self.true_se_vals_11 = self.se_scale * np.array(
          [[1, np.exp(-406.25 / 2)], [np.exp(-406.25 / 2), 1]]
      )
      self.true_se_vals_22 = self.se_scale * np.array(
          [[1, np.exp(-404 / 2)], [np.exp(-404 / 2), 1]]
      )
      self.true_se_vals_12 = self.se_scale * np.array(
          [
              [1, np.exp(-404 / 2)],
              [np.exp(-406.25 / 2), np.exp(-0.25 / 2)],
          ]
      )
      # Data for the Matern kernel
      self.nu_vals = [0.5, 1.5, 2.5]
      self.scaled_distances_11 = np.array(
          [[0, np.sqrt(406.25)], [np.sqrt(406.25), 0]]
      )
      self.scaled_distances_22 = np.array(
          [[0, np.sqrt(404)], [np.sqrt(404), 0]]
      )
      self.scaled_distances_12 = np.array(
          [[0, np.sqrt(404)], [np.sqrt(406.25), np.sqrt(0.25)]]
      )
      self.matern_scale = 2.1
      # Data for the polynomial kernel
      self.poly_order = 3
      self.poly_dim_scalings = [0.5, 2]
      self.poly_scale = 2
      self.true_poly_vals_11 = (
          self.poly_scale
          * np.array([[17.25, 37.75], [37.75, 84.25]])
          ** self.poly_order
      )
      self.true_poly_vals_22 = (
          self.poly_scale
          * np.array([[17.25, 33.75], [33.75, 67.25]])
          ** self.poly_order
      )
      self.true_poly_vals_12 = (
          self.poly_scale
          * np.array([[17.25, 33.75], [37.75, 75.25]])
          ** self.poly_order
      )
      # Data for the combined kernel
      self.com_scale = 4.3
      self.true_comb_11 = (
          self.com_scale * self.true_se_vals_11 * self.true_poly_vals_11
      )
      self.true_comb_22 = (
          self.com_scale * self.true_se_vals_22 * self.true_poly_vals_22
      )
      self.true_comb_12 = (
          self.com_scale * self.true_se_vals_12 * self.true_poly_vals_12
      )
  
file_path: dragonfly/dragonfly/gp/unittest_kernel.py
imports: from __future__ import absolute_import
  from __future__ import division
  import numpy
  from .kernel import Kernel, SEKernel, MaternKernel, PolyKernel, CoordinateProductKernel
  from ..utils.ancillary_utils import dicts_are_equal
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 1 for calling the KernelBasicTestCase obj's underlying member method code with example usage: obj.setUp() without return types