docstr: ...Test LogisticRegression setting of parameter of elastic_net_ratio
          
docstr_tok: ["...","Test","LogisticRegression","setting","of","parameter","of","elastic_net_ratio"]
code: def test_LogisticRegression_penalty_elastic_net_ratio(self):
      """...Test LogisticRegression setting of parameter of elastic_net_ratio"""
      ratio_1 = 0.6
      ratio_2 = 0.3
  
      for penalty in penalties:
          if penalty == "elasticnet":
              learner = LogisticRegression(
                  penalty=penalty,
                  C=self.float_1,
                  elastic_net_ratio=ratio_1,
              )
              self.assertEqual(learner.C, self.float_1)
              self.assertEqual(learner.elastic_net_ratio, ratio_1)
              self.assertEqual(
                  learner._prox_obj.strength, 1.0 / self.float_1
              )
              self.assertEqual(learner._prox_obj.ratio, ratio_1)
  
              learner.elastic_net_ratio = ratio_2
              self.assertEqual(learner.C, self.float_1)
              self.assertEqual(learner.elastic_net_ratio, ratio_2)
              self.assertEqual(learner._prox_obj.ratio, ratio_2)
  
          else:
              msg = (
                  '^Penalty "%s" has no elastic_net_ratio attribute$$'
                  % penalty
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  if penalty == "binarsity":
                      LogisticRegression(
                          penalty=penalty,
                          elastic_net_ratio=0.8,
                          blocks_start=[0],
                          blocks_length=[1],
                      )
                  else:
                      LogisticRegression(
                          penalty=penalty, elastic_net_ratio=0.8
                      )
  
              if penalty == "binarsity":
                  learner = LogisticRegression(
                      penalty=penalty,
                      blocks_start=[0],
                      blocks_length=[1],
                  )
              else:
                  learner = LogisticRegression(penalty=penalty)
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner.elastic_net_ratio = ratio_1
  
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 9 for calling the Test obj's underlying member method code with example usage: obj.test_LogisticRegression_penalty_elastic_net_ratio() without return types