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_sum_exp_kernel_least_sq_loss(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
      )
  
      integral_approx = hawkes_least_square_error(
          intensities,
          timestamps,
          self.model.end_times[self.realization],
      )
      integral_approx /= self.model.n_jumps
  
      self.assertAlmostEqual(
          integral_approx, self.model.loss(self.coeffs), places=2
      )
  
imports: import pickle
  import unittest
  import numpy
  from numpy.linalg import norm
  from scipy.optimize import check_grad, fmin_bfgs
  from tick.base.inference import InferenceTest
  from tick.hawkes.model import ModelHawkesSumExpKernLeastSq
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_sumexp_kernel_intensities, hawkes_sumexp_kernel_varying_intensities, hawkes_least_square_error
label_desc: Use image node_id 5 for calling the Test obj's underlying member method code with example usage: obj.test_model_hawkes_sum_exp_kernel_least_sq_loss() without return types