docstr: ...Test that ModelHawkesExpKernLeastSq can be serialized
          
docstr_tok: ["...","Test","that","ModelHawkesExpKernLeastSq","can","be","serialized"]
code: def test_model_hawkes_least_sq_serialization(self):
      """...Test that ModelHawkesExpKernLeastSq can be serialized"""
      for model in [self.model, self.model_list]:
          pickled = pickle.loads(pickle.dumps(model))
  
          self.assertEqual(model.n_nodes, pickled.n_nodes)
          np.testing.assert_equal(model.decays, pickled.decays)
          self.assertEqual(model.n_jumps, pickled.n_jumps)
  
          self.assertEqual(model.n_coeffs, pickled.n_coeffs)
          self.assertEqual(model.n_threads, pickled.n_threads)
          np.testing.assert_equal(model.data, pickled.data)
          coeffs = np.random.rand(model.n_coeffs)
          self.assertEqual(model.loss(coeffs), pickled.loss(coeffs))
  
file_path: tick/tick/hawkes/model/tests/model_hawkes_expkern_leastsq_test.py
imports: import pickle
  import unittest
  import numpy
  from scipy.optimize import check_grad
  from tick.hawkes.model import ModelHawkesExpKernLeastSq
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_exp_kernel_intensities, hawkes_least_square_error
label_desc: Use image node_id 11 for calling the Test obj's underlying member method code with example usage: obj.test_model_hawkes_least_sq_serialization() without return types