class_docstr: The Alpha Selection Visualizer demonstrates how different values of alpha
  influence model selection during the regularization of linear models.
  Generally speaking, alpha increases the affect of regularization, e.g. if
  alpha is zero there is no regularization and the higher the alpha, the
  more the regularization parameter influences the final model.
  
  Regularization is designed to penalize model complexity, therefore the
  higher the alpha, the less complex the model, decreasing the error due to
  variance (overfit). Alphas that are too high on the other hand increase
  the error due to bias (underfit). It is important, therefore to choose an
  optimal Alpha such that the error is minimized in both directions.
  
  To do this, typically you would you use one of the "RegressionCV" models
  in Scikit-Learn. E.g. instead of using the ``Ridge`` (L2) regularizer, you
  can use ``RidgeCV`` and pass a list of alphas, which will be selected
  based on the cross-validation score of each alpha. This visualizer wraps
  a "RegressionCV" model and visualizes the alpha/error curve. Use this
  visualization to detect if the model is responding to regularization, e.g.
  as you increase or decrease alpha, the model responds and error is
  decreased. If the visualization shows a jagged or random plot, then
  potentially the model is not sensitive to that type of regularization and
  another is required (e.g. L1 or ``Lasso`` regularization).
  
  Parameters
  ----------
  
  estimator : a Scikit-Learn regressor
      Should be an instance of a regressor, and specifically one whose name
      ends with "CV" otherwise a will raise a YellowbrickTypeError exception
      on instantiation. To use non-CV regressors see: ``ManualAlphaSelection``.
      If the estimator is not fitted, it is fit when the visualizer is fitted,
      unless otherwise specified by ``is_fitted``.
  
  ax : matplotlib Axes, default: None
      The axes to plot the figure on. If None is passed in the current axes
      will be used (or generated if required).
  
  is_fitted : bool or str, default='auto'
      Specify if the wrapped estimator is already fitted. If False, the estimator
      will be fit when the visualizer is fit, otherwise, the estimator will not be
      modified. If 'auto' (default), a helper method will check if the estimator
      is fitted before fitting it again.
  
  kwargs : dict
      Keyword arguments that are passed to the base class and may influence
      the visualization as defined in other Visualizers.
  
  Examples
  --------
  
  >>> from yellowbrick.regressor import AlphaSelection
  >>> from sklearn.linear_model import LassoCV
  >>> model = AlphaSelection(LassoCV())
  >>> model.fit(X, y)
  >>> model.show()
  
  Notes
  -----
  
  This class expects an estimator whose name ends with "CV". If you wish to
  use some other estimator, please see the ``ManualAlphaSelection``
  Visualizer for manually iterating through all alphas and selecting the
  best one.
  
  This Visualizer hooks into the Scikit-Learn API during ``fit()``. In
  order to pass a fitted model to the Visualizer, call the ``draw()`` method
  directly after instantiating the visualizer with the fitted model.
  
  Note, each "RegressorCV" module has many different methods for storing
  alphas and error. This visualizer attempts to get them all and is known
  to work for RidgeCV, LassoCV, LassoLarsCV, and ElasticNetCV. If your
  favorite regularization method doesn't work, please submit a bug report.
  
  For RidgeCV, make sure ``store_cv_values=True``.
class_docstr_tok: ["The","Alpha","Selection","Visualizer","demonstrates","how","different","values","of","alpha","influence","model","selection","during","the","regularization","of","linear","models",".","Generally","speaking",",","alpha","increases","the","affect","of","regularization",",","e.g",".","if","alpha","is","zero","there","is","no","regularization","and","the","higher","the","alpha",",","the","more","the","regularization","parameter","influences","the","final","model",".","Regularization","is","designed","to","penalize","model","complexity",",","therefore","the","higher","the","alpha",",","the","less","complex","the","model",",","decreasing","the","error","due","to","variance","(","overfit",")",".","Alphas","that","are","too","high","on","the","other","hand","increase","the","error","due","to","bias","(","underfit",")",".","It","is","important",",","therefore","to","choose","an","optimal","Alpha","such","that","the","error","is","minimized","in","both","directions",".","To","do","this",",","typically","you","would","you","use","one","of","the","``","RegressionCV","''","models","in","Scikit-Learn",".","E.g",".","instead","of","using","the","``","Ridge","``","(","L2",")","regularizer",",","you","can","use","``","RidgeCV","``","and","pass","a","list","of","alphas",",","which","will","be","selected","based","on","the","cross-validation","score","of","each","alpha",".","This","visualizer","wraps","a","``","RegressionCV","''","model","and","visualizes","the","alpha\/error","curve",".","Use","this","visualization","to","detect","if","the","model","is","responding","to","regularization",",","e.g",".","as","you","increase","or","decrease","alpha",",","the","model","responds","and","error","is","decreased",".","If","the","visualization","shows","a","jagged","or","random","plot",",","then","potentially","the","model","is","not","sensitive","to","that","type","of","regularization","and","another","is","required","(","e.g",".","L1","or","``","Lasso","``","regularization",")",".","Parameters","--","--","--","--","--","estimator",":","a","Scikit-Learn","regressor","Should","be","an","instance","of","a","regressor",",","and","specifically","one","whose","name","ends","with","``","CV","''","otherwise","a","will","raise","a","YellowbrickTypeError","exception","on","instantiation",".","To","use","non-CV","regressors","see",":","``","ManualAlphaSelection","``",".","If","the","estimator","is","not","fitted",",","it","is","fit","when","the","visualizer","is","fitted",",","unless","otherwise","specified","by","``","is_fitted","``",".","ax",":","matplotlib","Axes",",","default",":","None","The","axes","to","plot","the","figure","on",".","If","None","is","passed","in","the","current","axes","will","be","used","(","or","generated","if","required",")",".","is_fitted",":","bool","or","str",",","default='auto'","Specify","if","the","wrapped","estimator","is","already","fitted",".","If","False",",","the","estimator","will","be","fit","when","the","visualizer","is","fit",",","otherwise",",","the","estimator","will","not","be","modified",".","If","'auto","'","(","default",")",",","a","helper","method","will","check","if","the","estimator","is","fitted","before","fitting","it","again",".","kwargs",":","dict","Keyword","arguments","that","are","passed","to","the","base","class","and","may","influence","the","visualization","as","defined","in","other","Visualizers",".","Examples","--","--","--","--",">",">",">","from","yellowbrick.regressor","import","AlphaSelection",">",">",">","from","sklearn.linear_model","import","LassoCV",">",">",">","model","=","AlphaSelection","(","LassoCV","(",")",")",">",">",">","model.fit","(","X",",","y",")",">",">",">","model.show","(",")","Notes","--","--","-","This","class","expects","an","estimator","whose","name","ends","with","``","CV","''",".","If","you","wish","to","use","some","other","estimator",",","please","see","the","``","ManualAlphaSelection","``","Visualizer","for","manually","iterating","through","all","alphas","and","selecting","the","best","one",".","This","Visualizer","hooks","into","the","Scikit-Learn","API","during","``","fit","(",")","``",".","In","order","to","pass","a","fitted","model","to","the","Visualizer",",","call","the","``","draw","(",")","``","method","directly","after","instantiating","the","visualizer","with","the","fitted","model",".","Note",",","each","``","RegressorCV","''","module","has","many","different","methods","for","storing","alphas","and","error",".","This","visualizer","attempts","to","get","them","all","and","is","known","to","work","for","RidgeCV",",","LassoCV",",","LassoLarsCV",",","and","ElasticNetCV",".","If","your","favorite","regularization","method","does","n't","work",",","please","submit","a","bug","report",".","For","RidgeCV",",","make","sure","``","store_cv_values=True","``","."]
docstr: Searches for the parameter on the estimator that contains the array of
  errors that was used to determine the optimal alpha. If it cannot find
  the parameter then a YellowbrickValueError is raised.
docstr_tok: ["Searches","for","the","parameter","on","the","estimator","that","contains","the","array","of","errors","that","was","used","to","determine","the","optimal","alpha",".","If","it","can","not","find","the","parameter","then","a","YellowbrickValueError","is","raised","."]
code: def _find_errors_param(self):
      """
      Searches for the parameter on the estimator that contains the array of
      errors that was used to determine the optimal alpha. If it cannot find
      the parameter then a YellowbrickValueError is raised.
      """
  
      # NOTE: The order of the search is very important!
      if hasattr(self.estimator, "mse_path_"):
          return self.estimator.mse_path_.mean(1)
  
      if hasattr(self.estimator, "cv_values_"):
          return self.estimator.cv_values_.mean(0)
  
      raise YellowbrickValueError(
          "could not find errors param on {} estimator".format(
              self.estimator.__class__.__name__
          )
      )
  
imports: import numpy
  from functools import partial
  from yellowbrick.exceptions import YellowbrickTypeError
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.regressor.base import RegressionScoreVisualizer
  from sklearn.model_selection import cross_val_score
label_desc: Use image node_id 6 for calling the AlphaSelection obj's underlying member method code with example usage: obj._find_errors_param() and returns: self, self