docstr: ...Test that computed losses are consistent with approximated
  theoretical values
docstr_tok: ["...","Test","that","computed","losses","are","consistent","with","approximated","theoretical","values"]
code: def test_model_hawkes_losses(self):
      """...Test that computed losses are consistent with approximated
      theoretical values
      """
      timestamps = self.timestamps_list[self.realization]
  
      intensities = hawkes_sumexp_kernel_intensities(
          self.baseline, self.decays, self.adjacency, timestamps
      )
  
      precision = 3
  
      integral_approx = hawkes_log_likelihood(
          intensities, timestamps, self.end_time, precision=precision
      )
      integral_approx /= self.model.n_jumps
  
      self.assertAlmostEqual(
          integral_approx,
          -self.model.loss(self.coeffs),
          places=precision,
      )
  
file_path: tick/tick/hawkes/model/tests/model_hawkes_sumexpkern_loglik_test.py
imports: import unittest
  import numpy
  from scipy.optimize import check_grad
  from tick.hawkes.model import ModelHawkesSumExpKernLogLik
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_log_likelihood, hawkes_sumexp_kernel_intensities
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_model_hawkes_losses() without return types