class_docstr: Cox's proportional hazard's model with elastic net penalty.
  
  See the :ref:`User Guide </user_guide/coxnet.ipynb>` and [1]_ for further description.
  
  Parameters
  ----------
  n_alphas : int, optional, default: 100
      Number of alphas along the regularization path.
  
  alphas : array-like or None, optional
      List of alphas where to compute the models.
      If ``None`` alphas are set automatically.
  
  alpha_min_ratio : float or { "auto" }, optional, default: "auto"
      Determines minimum alpha of the regularization path
      if ``alphas`` is ``None``. The smallest value for alpha
      is computed as the fraction of the data derived maximum
      alpha (i.e. the smallest value for which all
      coefficients are zero).
  
      If set to "auto", the value will depend on the
      sample size relative to the number of features.
      If ``n_samples > n_features``, the default value is 0.0001
      If ``n_samples <= n_features``, 0.01 is the default value.
  
  l1_ratio : float, optional, default: 0.5
      The ElasticNet mixing parameter, with ``0 < l1_ratio <= 1``.
      For ``l1_ratio = 0`` the penalty is an L2 penalty.
      For ``l1_ratio = 1`` it is an L1 penalty.
      For ``0 < l1_ratio < 1``, the penalty is a combination of L1 and L2.
  
  penalty_factor : array-like or None, optional
      Separate penalty factors can be applied to each coefficient.
      This is a number that multiplies alpha to allow differential
      shrinkage.  Can be 0 for some variables, which implies no shrinkage,
      and that variable is always included in the model.
      Default is 1 for all variables.
  
      Note: the penalty factors are internally rescaled to sum to
      `n_features`, and the alphas sequence will reflect this change.
  
  normalize : boolean, optional, default: False
      If True, the features X will be normalized before optimization by
      subtracting the mean and dividing by the l2-norm.
      If you wish to standardize, please use
      :class:`sklearn.preprocessing.StandardScaler` before calling ``fit``
      on an estimator with ``normalize=False``.
  
  copy_X : boolean, optional, default: True
      If ``True``, X will be copied; else, it may be overwritten.
  
  tol : float, optional, default: 1e-7
      The tolerance for the optimization: optimization continues
      until all updates are smaller than ``tol``.
  
  max_iter : int, optional, default: 100000
      The maximum number of iterations.
  
  verbose : bool, optional, default: False
      Whether to print additional information during optimization.
  
  fit_baseline_model : bool, optional, default: False
      Whether to estimate baseline survival function
      and baseline cumulative hazard function for each alpha.
      If enabled, :meth:`predict_cumulative_hazard_function` and
      :meth:`predict_survival_function` can be used to obtain
      predicted  cumulative hazard function and survival function.
  
  Attributes
  ----------
  alphas_ : ndarray, shape=(n_alphas,)
      The actual sequence of alpha values used.
  
  alpha_min_ratio_ : float
      The inferred value of alpha_min_ratio.
  
  penalty_factor_ : ndarray, shape=(n_features,)
      The actual penalty factors used.
  
  coef_ : ndarray, shape=(n_features, n_alphas)
      Matrix of coefficients.
  
  offset_ : ndarray, shape=(n_alphas,)
      Bias term to account for non-centered features.
  
  deviance_ratio_ : ndarray, shape=(n_alphas,)
      The fraction of (null) deviance explained.
  
  n_features_in_ : int
      Number of features seen during ``fit``.
  
  feature_names_in_ : ndarray of shape (`n_features_in_`,)
      Names of features seen during ``fit``. Defined only when `X`
      has feature names that are all strings.
  
  unique_times_ : array of shape = (n_unique_times,)
      Unique time points.
  
  References
  ----------
  .. [1] Simon N, Friedman J, Hastie T, Tibshirani R.
         Regularization paths for Cox’s proportional hazards model via coordinate descent.
         Journal of statistical software. 2011 Mar;39(5):1.
class_docstr_tok: ["Cox","'s","proportional","hazard","'s","model","with","elastic","net","penalty",".","See","the",":","ref",":","`","User","Guide","<","\/user_guide\/coxnet.ipynb",">","`","and","[","1","]","_","for","further","description",".","Parameters","--","--","--","--","--","n_alphas",":","int",",","optional",",","default",":","100","Number","of","alphas","along","the","regularization","path",".","alphas",":","array-like","or","None",",","optional","List","of","alphas","where","to","compute","the","models",".","If","``","None","``","alphas","are","set","automatically",".","alpha_min_ratio",":","float","or","{","``","auto","''","}",",","optional",",","default",":","``","auto","''","Determines","minimum","alpha","of","the","regularization","path","if","``","alphas","``","is","``","None","``",".","The","smallest","value","for","alpha","is","computed","as","the","fraction","of","the","data","derived","maximum","alpha","(","i.e",".","the","smallest","value","for","which","all","coefficients","are","zero",")",".","If","set","to","``","auto","''",",","the","value","will","depend","on","the","sample","size","relative","to","the","number","of","features",".","If","``","n_samples",">","n_features","``",",","the","default","value","is","0.0001","If","``","n_samples","<","=","n_features","``",",","0.01","is","the","default","value",".","l1_ratio",":","float",",","optional",",","default",":","0.5","The","ElasticNet","mixing","parameter",",","with","``","0","<","l1_ratio","<","=","1","``",".","For","``","l1_ratio","=","0","``","the","penalty","is","an","L2","penalty",".","For","``","l1_ratio","=","1","``","it","is","an","L1","penalty",".","For","``","0","<","l1_ratio","<","1","``",",","the","penalty","is","a","combination","of","L1","and","L2",".","penalty_factor",":","array-like","or","None",",","optional","Separate","penalty","factors","can","be","applied","to","each","coefficient",".","This","is","a","number","that","multiplies","alpha","to","allow","differential","shrinkage",".","Can","be","0","for","some","variables",",","which","implies","no","shrinkage",",","and","that","variable","is","always","included","in","the","model",".","Default","is","1","for","all","variables",".","Note",":","the","penalty","factors","are","internally","rescaled","to","sum","to","`","n_features","`",",","and","the","alphas","sequence","will","reflect","this","change",".","normalize",":","boolean",",","optional",",","default",":","False","If","True",",","the","features","X","will","be","normalized","before","optimization","by","subtracting","the","mean","and","dividing","by","the","l2-norm",".","If","you","wish","to","standardize",",","please","use",":","class",":","`","sklearn.preprocessing.StandardScaler","`","before","calling","``","fit","``","on","an","estimator","with","``","normalize=False","``",".","copy_X",":","boolean",",","optional",",","default",":","True","If","``","True","``",",","X","will","be","copied",";","else",",","it","may","be","overwritten",".","tol",":","float",",","optional",",","default",":","1e-7","The","tolerance","for","the","optimization",":","optimization","continues","until","all","updates","are","smaller","than","``","tol","``",".","max_iter",":","int",",","optional",",","default",":","100000","The","maximum","number","of","iterations",".","verbose",":","bool",",","optional",",","default",":","False","Whether","to","print","additional","information","during","optimization",".","fit_baseline_model",":","bool",",","optional",",","default",":","False","Whether","to","estimate","baseline","survival","function","and","baseline","cumulative","hazard","function","for","each","alpha",".","If","enabled",",",":","meth",":","`","predict_cumulative_hazard_function","`","and",":","meth",":","`","predict_survival_function","`","can","be","used","to","obtain","predicted","cumulative","hazard","function","and","survival","function",".","Attributes","--","--","--","--","--","alphas_",":","ndarray",",","shape=","(","n_alphas",",",")","The","actual","sequence","of","alpha","values","used",".","alpha_min_ratio_",":","float","The","inferred","value","of","alpha_min_ratio",".","penalty_factor_",":","ndarray",",","shape=","(","n_features",",",")","The","actual","penalty","factors","used",".","coef_",":","ndarray",",","shape=","(","n_features",",","n_alphas",")","Matrix","of","coefficients",".","offset_",":","ndarray",",","shape=","(","n_alphas",",",")","Bias","term","to","account","for","non-centered","features",".","deviance_ratio_",":","ndarray",",","shape=","(","n_alphas",",",")","The","fraction","of","(","null",")","deviance","explained",".","n_features_in_",":","int","Number","of","features","seen","during","``","fit","``",".","feature_names_in_",":","ndarray","of","shape","(","`","n_features_in_","`",",",")","Names","of","features","seen","during","``","fit","``",".","Defined","only","when","`","X","`","has","feature","names","that","are","all","strings",".","unique_times_",":","array","of","shape","=","(","n_unique_times",",",")","Unique","time","points",".","References","--","--","--","--","--","..","[","1","]","Simon","N",",","Friedman","J",",","Hastie","T",",","Tibshirani","R.","Regularization","paths","for","Cox","\u2019","s","proportional","hazards","model","via","coordinate","descent",".","Journal","of","statistical","software",".","2011","Mar",";","39","(","5",")",":1","."]
code: def _check_alpha_min_ratio(self, n_samples, n_features):
      alpha_min_ratio = self.alpha_min_ratio
      if (
          isinstance(alpha_min_ratio, str)
          and self.alpha_min_ratio == "auto"
      ):
          if n_samples > n_features:
              alpha_min_ratio = 0.0001
          else:
              alpha_min_ratio = 0.01
  
      return alpha_min_ratio
  
imports: import numbers
  import warnings
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.preprocessing import normalize
  from sklearn.utils._param_validation import Interval, StrOptions
  from sklearn.utils.validation import assert_all_finite, check_is_fitted, check_non_negative, column_or_1d
  from ..base import SurvivalAnalysisMixin
  from ..util import check_array_survival
  from ._coxnet import call_fit_coxnet
  from .coxph import BreslowEstimator
label_desc: Use image node_id 5 for calling the CoxnetSurvivalAnalysis obj's underlying member method code with example usage: obj._check_alpha_min_ratio(n_samples, n_features) and returns: alpha_min_ratio