docstr: ...Test HawkesExpKern setting of random_state
  parameter of solver
docstr_tok: ["...","Test","HawkesExpKern","setting","of","random_state","parameter","of","solver"]
code: def test_HawkesExpKern_solver_random_state(self):
      """...Test HawkesExpKern setting of random_state
      parameter of solver
      """
      for solver in solvers:
          if solver in ["bfgs", "agd", "gd"]:
              msg = (
                  '^Solver "%s" has no settable random_state$' % solver
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner = HawkesExpKern(
                      self.decays,
                      solver=solver,
                      random_state=1,
                      **Test.specific_solver_kwargs(solver),
                  )
                  self.assertIsNone(learner.random_state)
          else:
              learner = HawkesExpKern(
                  self.decays,
                  solver=solver,
                  random_state=self.int_1,
                  **Test.specific_solver_kwargs(solver),
              )
              self.assertEqual(learner.random_state, self.int_1)
              self.assertEqual(learner._solver_obj.seed, self.int_1)
  
              msg = "^random_state must be positive, got -1$"
              with self.assertRaisesRegex(ValueError, msg):
                  HawkesExpKern(
                      self.decays, solver=solver, random_state=-1
                  )
  
          msg = "^random_state is readonly in HawkesExpKern"
          with self.assertRaisesRegex(AttributeError, msg):
              learner = HawkesExpKern(
                  self.decays,
                  solver=solver,
                  **Test.specific_solver_kwargs(solver),
              )
              learner.random_state = self.int_2
  
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 14 for calling the Test obj's underlying member method code with example usage: obj.test_HawkesExpKern_solver_random_state() without return types