docstr: ...Test solution obtained by HawkesADM4 on toy timestamps
          
docstr_tok: ["...","Test","solution","obtained","by","HawkesADM4","on","toy","timestamps"]
code: def test_hawkes_adm4_solution(self):
      """...Test solution obtained by HawkesADM4 on toy timestamps"""
      events = [
          [
              np.array([1, 1.2, 3.4, 5.8, 10.3, 11, 13.4]),
              np.array([2, 5, 8.3, 9.10, 15, 18, 20, 33]),
          ],
          [
              np.array([2, 3.2, 11.4, 12.8, 45]),
              np.array([2, 3, 8.8, 9, 15.3, 19]),
          ],
      ]
  
      n_nodes = len(events[0])
      rho = 0.5
      C = 10
      lasso_nuclear_ratio = 0.7
  
      baseline_start = np.zeros(n_nodes) + 0.2
      adjacency_start = np.zeros((n_nodes, n_nodes)) + 0.2
  
      learner = HawkesADM4(
          self.decay,
          rho=rho,
          C=C,
          lasso_nuclear_ratio=lasso_nuclear_ratio,
          n_threads=3,
          max_iter=11,
          verbose=False,
          em_max_iter=3,
          record_every=1,
      )
      learner.fit(
          events[0],
          baseline_start=baseline_start,
          adjacency_start=adjacency_start,
      )
  
      baseline = np.array([0.14551, 0.239859])
  
      adjacency = np.array(
          [[2.275416e-01, 8.234672e-02], [1.195861e-02, 4.070548e-10]]
      )
  
      np.testing.assert_array_almost_equal(
          learner.baseline, baseline, decimal=6
      )
      np.testing.assert_array_almost_equal(
          learner.adjacency, adjacency, decimal=6
      )
  
file_path: tick/tick/hawkes/inference/tests/hawkes_adm4_test.py
imports: import unittest
  import numpy
  from tick.hawkes import SimuHawkesExpKernels, SimuHawkesMulti
  from tick.hawkes.inference import HawkesADM4
label_desc: Use image node_id 4 for calling the Test obj's underlying member method code with example usage: obj.test_hawkes_adm4_solution() without return types