docstr: ...Test that multiple events list for ModelHawkesExpKernLogLik
  is consistent with direct integral estimation
docstr_tok: ["...","Test","that","multiple","events","list","for","ModelHawkesExpKernLogLik","is","consistent","with","direct","integral","estimation"]
code: def test_model_hawkes_loglik_multiple_events(self):
      """...Test that multiple events list for ModelHawkesExpKernLogLik
      is consistent with direct integral estimation
      """
      end_times = np.array(
          [max(map(max, e)) for e in self.timestamps_list]
      )
      end_times += 1.0
      self.model_list.fit(self.timestamps_list, end_times=end_times)
  
      decays = np.ones((self.n_nodes, self.n_nodes)) * self.decay
      intensities_list = [
          hawkes_exp_kernel_intensities(
              self.baseline, decays, self.adjacency, timestamps
          )
          for timestamps in self.timestamps_list
      ]
  
      integral_approx = sum(
          [
              hawkes_log_likelihood(intensities, timestamps, end_time)
              for (intensities, timestamps, end_time) in zip(
                  intensities_list,
                  self.timestamps_list,
                  self.model_list.end_times,
              )
          ]
      )
  
      integral_approx /= self.model_list.n_jumps
      self.assertAlmostEqual(
          integral_approx, -self.model_list.loss(self.coeffs), places=2
      )
  
file_path: tick/tick/hawkes/model/tests/model_hawkes_expkern_loglik_test.py
imports: import unittest
  import numpy
  from scipy.optimize import check_grad
  from tick.hawkes.model import ModelHawkesExpKernLogLik
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_log_likelihood, hawkes_exp_kernel_intensities
label_desc: Use image node_id 3 for calling the Test obj's underlying member method code with example usage: obj.test_model_hawkes_loglik_multiple_events() without return types