docstr: ...Test that Hawkes compensator yields residuals that are 1.0 on average
          
docstr_tok: ["...","Test","that","Hawkes","compensator","yields","residuals","that","are","1.0","on","average"]
code: def test_compensator(self):
      """...Test that Hawkes compensator yields residuals that are 1.0 on average"""
      self.hawkes.reset()
      self.assertLess(self.hawkes.spectral_radius(), 1)
      self.hawkes.end_time = 1000
      self.hawkes.simulate()
      self.hawkes.store_compensator_values()
      compensators = self.hawkes.tracked_compensator
      residuals = [np.diff(c) for c in compensators]
      for res in residuals:
          self.assertAlmostEqual(np.mean(res), 1.0, delta=0.1)
          self.assertAlmostEqual(np.quantile(res, 0.6), 1.0, delta=0.1)
  
file_path: tick/tick/hawkes/simulation/tests/simu_hawkes_exp_kernels_test.py
imports: import unittest
  from itertools import product
  import numpy
  from tick.hawkes import SimuHawkesExpKernels, HawkesKernelExp, HawkesKernel0
label_desc: Use image node_id 5 for calling the Test obj's underlying member method code with example usage: obj.test_compensator() without return types