docstr: ...Test parameters of ModelHawkesSumExpKernLeastSq
          
docstr_tok: ["...","Test","parameters","of","ModelHawkesSumExpKernLeastSq"]
code: def test_model_hawkes_sum_exp_kernel_least_sq_parameters(self):
      """...Test parameters of ModelHawkesSumExpKernLeastSq"""
      model = ModelHawkesSumExpKernLeastSq([1.0, 2.0])
      self.assertEqual(model.n_decays, 2)
      model = ModelHawkesSumExpKernLeastSq(np.array([1, 2]))
      self.assertEqual(model.n_decays, 2)
  
      n_baselines = 3
      period_length = 2.0
      msg = "n_baselines must be positive"
      with self.assertRaisesRegex(ValueError, msg):
          ModelHawkesSumExpKernLeastSq(
              self.decays, n_baselines=-1, period_length=period_length
          )
      msg = "period_length must be given if multiple baselines are used"
      with self.assertRaisesRegex(ValueError, msg):
          ModelHawkesSumExpKernLeastSq(
              self.decays, n_baselines=n_baselines
          )
      msg = "period_length has no effect when using a constant baseline"
      with self.assertWarnsRegex(UserWarning, msg):
          ModelHawkesSumExpKernLeastSq(
              self.decays, period_length=period_length
          )
  
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 2 for calling the Test obj's underlying member method code with example usage: obj.test_model_hawkes_sum_exp_kernel_least_sq_parameters() without return types