class_docstr: DecisionBoundariesVisualizer is a bivariate data visualization algorithm
  that plots the decision boundaries of each class.
  
  Parameters
  ----------
  estimator : estimator
      A scikit-learn estimator that should be a classifier. If the model is
      not a classifier, an exception is raised. If the internal model 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 not specified the current axes will be
      used (or generated if required).
  
  x : string, default: None
      The feature name that corresponds to a column name or index postion
      in the matrix that will be plotted against the x-axis
  
  y : string, default: None
      The feature name that corresponds to a column name or index postion
      in the matrix that will be plotted against the y-axis
  
  features : list of strings, default: None
      The names of the features or columns
  
  classes : list of str, defult: None
      The class labels to use for the legend ordered by the index of the sorted
      classes discovered in the ``fit()`` method. Specifying classes in this
      manner is used to change the class names to a more specific format or
      to label encoded integer classes. Some visualizers may also use this
      field to filter the visualization for specific classes. For more advanced
      usage specify an encoder rather than class labels.
  
  show_scatter : boolean, default: True
      If boolean is True, then a scatter plot with points will be drawn
      on top of the decision boundary graph
  
  step_size : float percentage, default: 0.0025
      Determines the step size for creating the numpy meshgrid that will
      later become the foundation of the decision boundary graph. The
      default value of 0.0025 means that the step size for constructing
      the meshgrid will be 0.25%% of differenes of the max and min of x
      and y for each feature.
  
  markers : iterable of strings, default: ,od*vh+
      Matplotlib style markers for points on the scatter plot points
  
  pcolormesh_alpha : float, default: 0.8
      Sets the alpha transparency for the meshgrid of model boundaries
  
  scatter_alpha : float, default: 1.0
      Sets the alpha transparency for the scatter plot points
  
  encoder : dict or LabelEncoder, default: None
      A mapping of classes to human readable labels. Often there is a mismatch
      between desired class labels and those contained in the target variable
      passed to ``fit()`` or ``score()``. The encoder disambiguates this mismatch
      ensuring that classes are labeled correctly in the visualization.
  
  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.
  
  force_model : bool, default: False
      Do not check to ensure that the underlying estimator is a classifier. This
      will prevent an exception when the visualizer is initialized but may result
      in unexpected or unintended behavior.
  
  kwargs : dict
      Keyword arguments passed to the visualizer base classes.
class_docstr_tok: ["DecisionBoundariesVisualizer","is","a","bivariate","data","visualization","algorithm","that","plots","the","decision","boundaries","of","each","class",".","Parameters","--","--","--","--","--","estimator",":","estimator","A","scikit-learn","estimator","that","should","be","a","classifier",".","If","the","model","is","not","a","classifier",",","an","exception","is","raised",".","If","the","internal","model","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","not","specified","the","current","axes","will","be","used","(","or","generated","if","required",")",".","x",":","string",",","default",":","None","The","feature","name","that","corresponds","to","a","column","name","or","index","postion","in","the","matrix","that","will","be","plotted","against","the","x-axis","y",":","string",",","default",":","None","The","feature","name","that","corresponds","to","a","column","name","or","index","postion","in","the","matrix","that","will","be","plotted","against","the","y-axis","features",":","list","of","strings",",","default",":","None","The","names","of","the","features","or","columns","classes",":","list","of","str",",","defult",":","None","The","class","labels","to","use","for","the","legend","ordered","by","the","index","of","the","sorted","classes","discovered","in","the","``","fit","(",")","``","method",".","Specifying","classes","in","this","manner","is","used","to","change","the","class","names","to","a","more","specific","format","or","to","label","encoded","integer","classes",".","Some","visualizers","may","also","use","this","field","to","filter","the","visualization","for","specific","classes",".","For","more","advanced","usage","specify","an","encoder","rather","than","class","labels",".","show_scatter",":","boolean",",","default",":","True","If","boolean","is","True",",","then","a","scatter","plot","with","points","will","be","drawn","on","top","of","the","decision","boundary","graph","step_size",":","float","percentage",",","default",":","0.0025","Determines","the","step","size","for","creating","the","numpy","meshgrid","that","will","later","become","the","foundation","of","the","decision","boundary","graph",".","The","default","value","of","0.0025","means","that","the","step","size","for","constructing","the","meshgrid","will","be","0.25","%","%","of","differenes","of","the","max","and","min","of","x","and","y","for","each","feature",".","markers",":","iterable","of","strings",",","default",":",",","od","*","vh+","Matplotlib","style","markers","for","points","on","the","scatter","plot","points","pcolormesh_alpha",":","float",",","default",":","0.8","Sets","the","alpha","transparency","for","the","meshgrid","of","model","boundaries","scatter_alpha",":","float",",","default",":","1.0","Sets","the","alpha","transparency","for","the","scatter","plot","points","encoder",":","dict","or","LabelEncoder",",","default",":","None","A","mapping","of","classes","to","human","readable","labels",".","Often","there","is","a","mismatch","between","desired","class","labels","and","those","contained","in","the","target","variable","passed","to","``","fit","(",")","``","or","``","score","(",")","``",".","The","encoder","disambiguates","this","mismatch","ensuring","that","classes","are","labeled","correctly","in","the","visualization",".","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",".","force_model",":","bool",",","default",":","False","Do","not","check","to","ensure","that","the","underlying","estimator","is","a","classifier",".","This","will","prevent","an","exception","when","the","visualizer","is","initialized","but","may","result","in","unexpected","or","unintended","behavior",".","kwargs",":","dict","Keyword","arguments","passed","to","the","visualizer","base","classes","."]
docstr: Called from the fit method, this method creates a decision boundary
  plot, and if self.scatter is True, it will scatter plot that draws
  each instance as a class or target colored point, whose location
  is determined by the feature data set.
docstr_tok: ["Called","from","the","fit","method",",","this","method","creates","a","decision","boundary","plot",",","and","if","self.scatter","is","True",",","it","will","scatter","plot","that","draws","each","instance","as","a","class","or","target","colored","point",",","whose","location","is","determined","by","the","feature","data","set","."]
code: def draw(self, X, y=None, **kwargs):
      """
      Called from the fit method, this method creates a decision boundary
      plot, and if self.scatter is True, it will scatter plot that draws
      each instance as a class or target colored point, whose location
      is determined by the feature data set.
      """
      # ensure that if someone is passing in another X such as X_test, that
      # features will be properly handled
      X = self._select_feature_columns(X)
  
      color_cycle = iter(
          resolve_colors(
              colors=self.class_colors_, n_colors=len(self.classes_)
          )
      )
      colors = OrderedDict(
          [(c, next(color_cycle)) for c in self.classes_.keys()]
      )
  
      self.ax.pcolormesh(
          self.xx,
          self.yy,
          self.Z_shape,
          alpha=self.pcolormesh_alpha,
          cmap=ListedColormap(colors.values()),
      )
  
      # Create a data structure to hold the scatter plot representations
      to_plot = OrderedDict()
      for index in self.classes_.values():
          to_plot[index] = [[], []]
  
      # Add each row of the data set to to_plot for plotting
      for i, row in enumerate(X):
          row_ = np.repeat(np.expand_dims(row, axis=1), 2, axis=1)
          x_, y_ = row_[0], row_[1]
          # look up the y class name if given in init
          if self.class_labels is not None:
              target = self.class_labels[y[i]]
          else:
              target = y[i]
          index = self.classes_[target]
          to_plot[index][0].append(x_)
          to_plot[index][1].append(y_)
  
      # Add the scatter plots from the to_plot function
      # TODO: store these plots to add more instances to later
      # TODO: make this a separate function
  
      if self.show_scatter:
          for kls, index in self.classes_.items():
              self.ax.scatter(
                  to_plot[index][0],
                  to_plot[index][1],
                  marker=next(self.markers),
                  color=colors[kls],
                  alpha=self.scatter_alpha,
                  s=30,
                  edgecolors="black",
                  label=str(kls),
                  **kwargs,
              )
      else:
          labels = [
              Patch(color=colors[kls], label=kls)
              for kls in self.classes_.keys()
          ]
          self.ax.legend(handles=labels)
  
imports: import itertools
  import numpy
  from collections import OrderedDict
  from matplotlib.patches import Patch
  from matplotlib.colors import ListedColormap
  from yellowbrick.exceptions import YellowbrickTypeError
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.classifier.base import ClassificationScoreVisualizer
  from yellowbrick.style.colors import resolve_colors
  from yellowbrick.utils import is_dataframe, is_structured_array
  from yellowbrick.utils import has_ndarray_int_columns
label_desc: Use image node_id 4 for calling the DecisionBoundariesVisualizer obj's underlying member method code with example usage: obj.draw(X, y) without return types