docstr: ...Test LogisticRegression fit with different solvers and penalties
          
docstr_tok: ["...","Test","LogisticRegression","fit","with","different","solvers","and","penalties"]
code: def test_LogisticRegression_fit(self):
      """...Test LogisticRegression fit with different solvers and penalties"""
      sto_seed = 179312
      raw_features, y = Test.get_train_data()
  
      for fit_intercept in [True, False]:
          for penalty in penalties:
              if penalty == "binarsity":
                  # binarize features
                  n_cuts = 3
                  binarizer = FeaturesBinarizer(n_cuts=n_cuts)
                  features = binarizer.fit_transform(raw_features)
              else:
                  features = raw_features
  
              for solver in solvers:
                  solver_kwargs = {
                      "penalty": penalty,
                      "tol": 1e-5,
                      "solver": solver,
                      "verbose": False,
                      "max_iter": 10,
                      "fit_intercept": fit_intercept,
                  }
  
                  if penalty != "none":
                      solver_kwargs["C"] = 100
  
                  if penalty == "binarsity":
                      solver_kwargs[
                          "blocks_start"
                      ] = binarizer.blocks_start
                      solver_kwargs[
                          "blocks_length"
                      ] = binarizer.blocks_length
  
                  if solver == "sdca":
                      solver_kwargs["sdca_ridge_strength"] = 2e-2
  
                  if solver in ["sgd", "svrg", "sdca"]:
                      solver_kwargs["random_state"] = sto_seed
  
                  if solver == "sgd":
                      solver_kwargs["step"] = 1.0
  
                  if solver == "bfgs":
                      # BFGS only accepts ProxZero and ProxL2sq for now
                      if penalty not in ["none", "l2"]:
                          continue
  
                  learner = LogisticRegression(**solver_kwargs)
                  learner.fit(features, y)
                  probas = learner.predict_proba(features)[:, 1]
                  auc = roc_auc_score(y, probas)
                  self.assertGreater(
                      auc,
                      0.7,
                      "solver %s with penalty %s and "
                      "intercept %s reached too low AUC"
                      % (solver, penalty, fit_intercept),
                  )
  
imports: import itertools
  import unittest
  import numpy
  from sklearn.metrics import roc_auc_score
  from tick.base.inference import InferenceTest
  from tick.linear_model import SimuLogReg, LogisticRegression
  from tick.simulation import weights_sparse_gauss
  from tick.preprocessing.features_binarizer import FeaturesBinarizer
  from tick.prox import ProxZero, ProxL1, ProxL2Sq, ProxElasticNet, ProxTV, ProxBinarsity
label_desc: Use image node_id 3 for calling the Test obj's underlying member method code with example usage: obj.test_LogisticRegression_fit() without return types