docstr: Test longitudinal multinomial model convergence.
docstr_tok: ["Test","longitudinal","multinomial","model","convergence","."]
code: def test_convergence_with_lags(self):
      """Test longitudinal multinomial model convergence."""
      n_intervals = 10
      n_samples = 800
      n_features = 2
      n_lags = np.repeat(2, n_features).astype(dtype="uint64")
      sim = SimuSCCS(
          n_samples,
          n_intervals,
          n_features,
          n_lags,
          None,
          "multiple_exposures",
          seed=42,
      )
      _, X, y, censoring, coeffs = sim.simulate()
      coeffs = np.hstack(coeffs)
      X, _, _ = LongitudinalFeaturesLagger(n_lags=n_lags).fit_transform(
          X, censoring
      )
      model = ModelSCCS(n_intervals=n_intervals, n_lags=n_lags).fit(
          X, y, censoring
      )
      solver = SVRG(max_iter=15, verbose=False)
      solver.set_model(model).set_prox(ProxZero())
      coeffs_svrg = solver.solve(step=1 / model.get_lip_max())
      np.testing.assert_almost_equal(coeffs, coeffs_svrg, decimal=1)
  
file_path: tick/tick/survival/tests/model_sccs_test.py
imports: import unittest, pickle
  import numpy
  from scipy.optimize import check_grad, fmin_bfgs
  from scipy.linalg import norm
  from scipy.sparse import csr_matrix
  from tick.survival import SimuSCCS, ModelSCCS
  from tick.preprocessing import LongitudinalFeaturesLagger
  from tick.solver import SVRG
  from tick.prox import ProxZero
label_desc: Use image node_id 6 for calling the ModelSCCSTest obj's underlying member method code with example usage: obj.test_convergence_with_lags() without return types