docstr: ...Test HawkesExpKern score method
          
docstr_tok: ["...","Test","HawkesExpKern","score","method"]
code: def test_HawkesExpKern_score(self):
      """...Test HawkesExpKern score method"""
      n_nodes = 2
      n_realizations = 3
  
      train_events = [
          [np.cumsum(np.random.rand(4 + i)) for i in range(n_nodes)]
          for _ in range(n_realizations)
      ]
  
      test_events = [
          [np.cumsum(np.random.rand(4 + i)) for i in range(n_nodes)]
          for _ in range(n_realizations)
      ]
  
      learner = HawkesExpKern(self.decays, record_every=1)
  
      msg = "^You must either call `fit` before `score` or provide events$"
      with self.assertRaisesRegex(ValueError, msg):
          learner.score()
  
      given_baseline = np.random.rand(n_nodes)
      given_adjacency = np.random.rand(n_nodes, n_nodes)
  
      learner.fit(train_events)
  
      train_score_current_coeffs = learner.score()
      self.assertAlmostEqual(train_score_current_coeffs, 2.0855840)
  
      train_score_given_coeffs = learner.score(
          baseline=given_baseline, adjacency=given_adjacency
      )
      self.assertAlmostEqual(train_score_given_coeffs, 0.59502417)
  
      test_score_current_coeffs = learner.score(test_events)
      self.assertAlmostEqual(test_score_current_coeffs, 1.6001762)
  
      test_score_given_coeffs = learner.score(
          test_events,
          baseline=given_baseline,
          adjacency=given_adjacency,
      )
      self.assertAlmostEqual(test_score_given_coeffs, 0.89322199)
  
imports: import unittest
  import numpy
  from tick.base.inference import InferenceTest
  from tick.hawkes import SimuHawkesExpKernels
  from tick.hawkes.inference import HawkesExpKern
  from tick.hawkes.model.model_hawkes_expkern_leastsq import ModelHawkesExpKernLeastSq
  from tick.hawkes.model.model_hawkes_expkern_loglik import ModelHawkesExpKernLogLik
  from tick.prox import ProxNuclear
  from tick.prox import ProxPositive, ProxL1, ProxL2Sq, ProxElasticNet
  from tick.solver import AGD, GD, BFGS, SGD, SVRG
label_desc: Use image node_id 6 for calling the Test obj's underlying member method code with example usage: obj.test_HawkesExpKern_score() without return types