docstr: Return a regularized fit to a linear regression model.
  
  Parameters
  ----------
  method : {'elastic_net'}
      Only the `elastic_net` approach is currently implemented.
  alpha : scalar or array_like
      The penalty weight.  If a scalar, the same penalty weight
      applies to all variables in the model.  If a vector, it
      must have the same length as `params`, and contains a
      penalty weight for each coefficient.
  start_params : array_like
      Starting values for `params`.
  refit : bool
      If True, the model is refit using only the variables that
      have non-zero coefficients in the regularized fit.  The
      refitted model is not regularized.
  **kwargs
      Additional keyword argument that are used when fitting the model.
  
  Returns
  -------
  Results
      A results instance.
docstr_tok: ["Return","a","regularized","fit","to","a","linear","regression","model",".","Parameters","--","--","--","--","--","method",":","{","'elastic_net","'","}","Only","the","`","elastic_net","`","approach","is","currently","implemented",".","alpha",":","scalar","or","array_like","The","penalty","weight",".","If","a","scalar",",","the","same","penalty","weight","applies","to","all","variables","in","the","model",".","If","a","vector",",","it","must","have","the","same","length","as","`","params","`",",","and","contains","a","penalty","weight","for","each","coefficient",".","start_params",":","array_like","Starting","values","for","`","params","`",".","refit",":","bool","If","True",",","the","model","is","refit","using","only","the","variables","that","have","non-zero","coefficients","in","the","regularized","fit",".","The","refitted","model","is","not","regularized",".","*","*","kwargs","Additional","keyword","argument","that","are","used","when","fitting","the","model",".","Returns","--","--","--","-","Results","A","results","instance","."]
code: def fit_regularized(
      self,
      method="elastic_net",
      alpha=0.0,
      start_params=None,
      refit=False,
      **kwargs,
  ):
      """
      Return a regularized fit to a linear regression model.
  
      Parameters
      ----------
      method : {'elastic_net'}
          Only the `elastic_net` approach is currently implemented.
      alpha : scalar or array_like
          The penalty weight.  If a scalar, the same penalty weight
          applies to all variables in the model.  If a vector, it
          must have the same length as `params`, and contains a
          penalty weight for each coefficient.
      start_params : array_like
          Starting values for `params`.
      refit : bool
          If True, the model is refit using only the variables that
          have non-zero coefficients in the regularized fit.  The
          refitted model is not regularized.
      **kwargs
          Additional keyword argument that are used when fitting the model.
  
      Returns
      -------
      Results
          A results instance.
      """
  
      from statsmodels.base.elastic_net import fit_elasticnet
  
      if method != "elastic_net":
          raise ValueError(
              "method for fit_regularized must be elastic_net"
          )
  
      defaults = {
          "maxiter": 50,
          "L1_wt": 1,
          "cnvrg_tol": 1e-10,
          "zero_tol": 1e-10,
      }
      defaults.update(kwargs)
  
      return fit_elasticnet(
          self,
          method=method,
          alpha=alpha,
          start_params=start_params,
          refit=refit,
          **defaults,
      )
  
imports: import numpy
  import statsmodels.base.model
  import statsmodels.regression.linear_model
  import statsmodels.base.wrapper
  from statsmodels.discrete.discrete_model import MultinomialResults, MultinomialResultsWrapper
  import collections
  import warnings
  import itertools
label_desc: Use image node_id 4 for calling the _ConditionalModel obj's underlying member method code with example usage: obj.fit_regularized(method, alpha, start_params, refit) and returns: fit_elasticnet