class_docstr: Basic tests for Kernel function 
class_docstr_tok: ["Basic","tests","for","Kernel","function"]
docstr: Tests for the effective length in the SE kernel. 
docstr_tok: ["Tests","for","the","effective","length","in","the","SE","kernel","."]
code: def test_effective_length_se(self):
      """Tests for the effective length in the SE kernel."""
      # pylint: disable=too-many-locals
      self.report("Tests for the effective length in the SE kernel.")
      data_1 = np.array([1, 2])
      data_2 = np.array([[0, 1, 2], [1, 1, 0.5]])
      bws_1 = [0.1, 1]
      bws_2 = [0.5, 1, 2]
      res_l2_1 = np.sqrt(104)
      res_l2_2 = np.array([np.sqrt(2), np.sqrt(5.0625)])
      res_l1_1 = 12
      res_l1_2 = np.array([2, 3.25])
      dim_1 = 2
      dim_2 = 3
      all_data = [
          (data_1, bws_1, dim_1, res_l2_1, res_l1_1),
          (data_2, bws_2, dim_2, res_l2_2, res_l1_2),
      ]
      for data in all_data:
          kern = SEKernel(data[2], 1, data[1])
          eff_l1_norms = kern.get_effective_norm(
              data[0], order=1, is_single=len(data[0].shape) == 1
          )
          eff_l2_norms = kern.get_effective_norm(
              data[0], order=2, is_single=len(data[0].shape) == 1
          )
          assert np.linalg.norm(eff_l2_norms - data[3]) < 1e-5
          assert np.linalg.norm(eff_l1_norms - data[4]) < 1e-5
  
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 8 for calling the KernelBasicTestCase obj's underlying member method code with example usage: obj.test_effective_length_se() without return types