docstr: ...Check ASAGA solver for a Logistic Regression with Elastic net
  penalization
docstr_tok: ["...","Check","ASAGA","solver","for","a","Logistic","Regression","with","Elastic","net","penalization"]
code: def test_asaga_solver(self):
      """...Check ASAGA solver for a Logistic Regression with Elastic net
      penalization
      """
      seed = 1398
      np.random.seed(seed)
      n_samples = 4000
      n_features = 30
      weights = weights_sparse_gauss(n_features, nnz=3).astype(
          self.dtype
      )
      intercept = 0.2
      penalty_strength = 1e-3
      sparsity = 1e-4
      features = sparse.rand(
          n_samples,
          n_features,
          density=sparsity,
          format="csr",
          random_state=8,
      ).astype(self.dtype)
  
      simulator = SimuLogReg(
          weights,
          n_samples=n_samples,
          features=features,
          verbose=False,
          intercept=intercept,
          dtype=self.dtype,
      )
      features, labels = simulator.simulate()
  
      model = ModelLogReg(fit_intercept=True)
      model.fit(features, labels)
      prox = ProxElasticNet(
          penalty_strength, ratio=0.1, range=(0, n_features)
      )
      solver_step = 1.0 / model.get_lip_max()
      saga = SAGA(
          step=solver_step,
          max_iter=100,
          tol=1e-10,
          verbose=False,
          n_threads=1,
          record_every=10,
          seed=seed,
      )
      saga.set_model(model).set_prox(prox)
      saga.solve()
  
      asaga = SAGA(
          step=solver_step,
          max_iter=100,
          tol=1e-10,
          verbose=False,
          n_threads=2,
          record_every=10,
          seed=seed,
      )
      asaga.set_model(model).set_prox(prox)
      asaga.solve()
  
      np.testing.assert_array_almost_equal(
          saga.solution, asaga.solution, decimal=4
      )
      self.assertGreater(np.linalg.norm(saga.solution[:-1]), 0)
  
imports: import unittest
  import numpy
  from scipy import sparse
  from tick.prox import ProxElasticNet
  from tick.solver import SAGA
  from tick.solver.tests import TestSolver
  from tick.solver.build.solver import SAGADouble
  from tick.linear_model import ModelLogReg, SimuLogReg
  from tick.survival import SimuCoxReg, ModelCoxRegPartialLik
  from tick.simulation import weights_sparse_gauss
label_desc: Use image node_id 1 for calling the ASAGATest obj's underlying member method code with example usage: obj.test_asaga_solver() without return types