docstr: ...Test RobustLinearRegression setting of parameter of elastic_net_ratio
          
docstr_tok: ["...","Test","RobustLinearRegression","setting","of","parameter","of","elastic_net_ratio"]
code: def test_RobustLinearRegression_penalty_elastic_net_ratio(self):
      """...Test RobustLinearRegression setting of parameter of elastic_net_ratio"""
      ratio_1 = 0.6
      ratio_2 = 0.3
      for penalty in RobustLinearRegression._penalties.keys():
          if penalty == "elasticnet":
              learner = RobustLinearRegression(
                  C_sample_intercepts=1.0,
                  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):
                  RobustLinearRegression(
                      C_sample_intercepts=1.0,
                      penalty=penalty,
                      elastic_net_ratio=0.8,
                  )
  
              learner = RobustLinearRegression(
                  C_sample_intercepts=1.0, penalty=penalty
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner.elastic_net_ratio = ratio_1
  
imports: import itertools
  import unittest
  import numpy
  from tick.base.inference import InferenceTest
  from tick.robust import RobustLinearRegression
  from tick.simulation import weights_sparse_gauss, features_normal_cov_toeplitz
  from tick.metrics import support_fdp, support_recall
label_desc: Use image node_id 11 for calling the Test obj's underlying member method code with example usage: obj.test_RobustLinearRegression_penalty_elastic_net_ratio() without return types