class_docstr: The ``AlphaSelection`` visualizer requires a "RegressorCV", that is a
  specialized class that performs cross-validated alpha-selection on behalf
  of the model. If the regressor you wish to use doesn't have an associated
  "CV" estimator, or for some reason you would like to specify more control
  over the alpha selection process, then you can use this manual alpha
  selection visualizer, which is essentially a wrapper for
  ``cross_val_score``, fitting a model for each alpha specified.
  
  Parameters
  ----------
  
  estimator : an unfitted Scikit-Learn regressor
      Should be an instance of an unfitted regressor, and specifically one
      whose name doesn't end with "CV". The regressor must support a call to
      ``set_params(alpha=alpha)`` and be fit multiple times. If the
      regressor name ends with "CV" a ``YellowbrickValueError`` is raised.
  
  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).
  
  alphas : ndarray or Series, default: np.logspace(-10, 2, 200)
      An array of alphas to fit each model with
  
  cv : int, cross-validation generator or an iterable, optional
      Determines the cross-validation splitting strategy.
      Possible inputs for cv are:
  
      - None, to use the default 3-fold cross validation,
      - integer, to specify the number of folds in a `(Stratified)KFold`,
      - An object to be used as a cross-validation generator.
      - An iterable yielding train, test splits.
  
      This argument is passed to the
      ``sklearn.model_selection.cross_val_score`` method to produce the
      cross validated score for each alpha.
  
  scoring : string, callable or None, optional, default: None
      A string (see model evaluation documentation) or
      a scorer callable object / function with signature
      ``scorer(estimator, X, y)``.
  
      This argument is passed to the
      ``sklearn.model_selection.cross_val_score`` method to produce the
      cross validated score for each alpha.
  
  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 ManualAlphaSelection
  >>> from sklearn.linear_model import Ridge
  >>> model = ManualAlphaSelection(
  ...     Ridge(), cv=12, scoring='neg_mean_squared_error'
  ... )
  ...
  >>> model.fit(X, y)
  >>> model.show()
  
  Notes
  -----
  
  This class does not take advantage of estimator-specific searching and is
  therefore less optimal and more time consuming than the regular
  "RegressorCV" estimators.
class_docstr_tok: ["The","``","AlphaSelection","``","visualizer","requires","a","``","RegressorCV","''",",","that","is","a","specialized","class","that","performs","cross-validated","alpha-selection","on","behalf","of","the","model",".","If","the","regressor","you","wish","to","use","does","n't","have","an","associated","''","CV","''","estimator",",","or","for","some","reason","you","would","like","to","specify","more","control","over","the","alpha","selection","process",",","then","you","can","use","this","manual","alpha","selection","visualizer",",","which","is","essentially","a","wrapper","for","``","cross_val_score","``",",","fitting","a","model","for","each","alpha","specified",".","Parameters","--","--","--","--","--","estimator",":","an","unfitted","Scikit-Learn","regressor","Should","be","an","instance","of","an","unfitted","regressor",",","and","specifically","one","whose","name","does","n't","end","with","``","CV","''",".","The","regressor","must","support","a","call","to","``","set_params","(","alpha=alpha",")","``","and","be","fit","multiple","times",".","If","the","regressor","name","ends","with","``","CV","''","a","``","YellowbrickValueError","``","is","raised",".","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",")",".","alphas",":","ndarray","or","Series",",","default",":","np.logspace","(","-10",",","2",",","200",")","An","array","of","alphas","to","fit","each","model","with","cv",":","int",",","cross-validation","generator","or","an","iterable",",","optional","Determines","the","cross-validation","splitting","strategy",".","Possible","inputs","for","cv","are",":","-","None",",","to","use","the","default","3-fold","cross","validation",",","-","integer",",","to","specify","the","number","of","folds","in","a","`","(","Stratified",")","KFold","`",",","-","An","object","to","be","used","as","a","cross-validation","generator",".","-","An","iterable","yielding","train",",","test","splits",".","This","argument","is","passed","to","the","``","sklearn.model_selection.cross_val_score","``","method","to","produce","the","cross","validated","score","for","each","alpha",".","scoring",":","string",",","callable","or","None",",","optional",",","default",":","None","A","string","(","see","model","evaluation","documentation",")","or","a","scorer","callable","object","\/","function","with","signature","``","scorer","(","estimator",",","X",",","y",")","``",".","This","argument","is","passed","to","the","``","sklearn.model_selection.cross_val_score","``","method","to","produce","the","cross","validated","score","for","each","alpha",".","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","ManualAlphaSelection",">",">",">","from","sklearn.linear_model","import","Ridge",">",">",">","model","=","ManualAlphaSelection","(","...","Ridge","(",")",",","cv=12",",","scoring='neg_mean_squared_error'","...",")","...",">",">",">","model.fit","(","X",",","y",")",">",">",">","model.show","(",")","Notes","--","--","-","This","class","does","not","take","advantage","of","estimator-specific","searching","and","is","therefore","less","optimal","and","more","time","consuming","than","the","regular","''","RegressorCV","''","estimators","."]
docstr: The fit method is the primary entry point for the manual alpha
  selection visualizer. It sets the alpha param for each alpha in the
  alphas list on the wrapped estimator, then scores the model using the
  passed in X and y data set. Those scores are then aggregated and
  drawn using matplotlib.
docstr_tok: ["The","fit","method","is","the","primary","entry","point","for","the","manual","alpha","selection","visualizer",".","It","sets","the","alpha","param","for","each","alpha","in","the","alphas","list","on","the","wrapped","estimator",",","then","scores","the","model","using","the","passed","in","X","and","y","data","set",".","Those","scores","are","then","aggregated","and","drawn","using","matplotlib","."]
code: def fit(self, X, y, **args):
      """
      The fit method is the primary entry point for the manual alpha
      selection visualizer. It sets the alpha param for each alpha in the
      alphas list on the wrapped estimator, then scores the model using the
      passed in X and y data set. Those scores are then aggregated and
      drawn using matplotlib.
      """
      self.errors = []
      for alpha in self.alphas:
          self.estimator.set_params(alpha=alpha)
          scores = self.score_method(self.estimator, X, y)
          self.errors.append(scores.mean())
  
      # Convert errors to an ND array and draw
      self.errors = np.array(self.errors)
      self.draw()
  
      # Always make sure to return self from fit
      return self
  
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 2 for calling the ManualAlphaSelection obj's underlying member method code with example usage: obj.fit(X, y) and returns: self