parameters: (self, include_values=True, cmap='viridis',
               xticks_rotation='horizontal', values_format=None, ax=None)
return_statement: return self
docstring: Plot visualization.
  
          Parameters
          ----------
          include_values : bool, default=True
              Includes values in confusion matrix.
  
          cmap : str or matplotlib Colormap, default='viridis'
              Colormap recognized by matplotlib.
  
          xticks_rotation : {'vertical', 'horizontal'} or float, \
                           default='horizontal'
              Rotation of xtick labels.
  
          values_format : str, default=None
              Format specification for values in confusion matrix. If `None`,
              the format specification is '.2g'.
  
          ax : matplotlib axes, default=None
              Axes object to plot on. If `None`, a new figure and axes is
              created.
  
          Returns
          -------
          display : :class:`~sklearn.metrics.ConfusionMatrixDisplay`
docstring_summary: Plot visualization.
docstring_tokens: Plot visualization .
function: def plot(self, include_values=True, cmap='viridis',
               xticks_rotation='horizontal', values_format=None, ax=None):
          """Plot visualization.
  
          Parameters
          ----------
          include_values : bool, default=True
              Includes values in confusion matrix.
  
          cmap : str or matplotlib Colormap, default='viridis'
              Colormap recognized by matplotlib.
  
          xticks_rotation : {'vertical', 'horizontal'} or float, \
                           default='horizontal'
              Rotation of xtick labels.
  
          values_format : str, default=None
              Format specification for values in confusion matrix. If `None`,
              the format specification is '.2g'.
  
          ax : matplotlib axes, default=None
              Axes object to plot on. If `None`, a new figure and axes is
              created.
  
          Returns
          -------
          display : :class:`~sklearn.metrics.ConfusionMatrixDisplay`
          """
          check_matplotlib_support("ConfusionMatrixDisplay.plot")
          import matplotlib.pyplot as plt
  
          if ax is None:
              fig, ax = plt.subplots()
          else:
              fig = ax.figure
  
          cm = self.confusion_matrix
          n_classes = cm.shape[0]
          self.im_ = ax.imshow(cm, interpolation='nearest', cmap=cmap)
          self.text_ = None
  
          cmap_min, cmap_max = self.im_.cmap(0), self.im_.cmap(256)
  
          if include_values:
              self.text_ = np.empty_like(cm, dtype=object)
              if values_format is None:
                  values_format = '.2g'
  
              # print text with appropriate color depending on background
              thresh = (cm.max() + cm.min()) / 2.0
              for i, j in product(range(n_classes), range(n_classes)):
                  color = cmap_max if cm[i, j] < thresh else cmap_min
                  self.text_[i, j] = ax.text(j, i,
                                             format(cm[i, j], values_format),
                                             ha="center", va="center",
                                             color=color)
  
          fig.colorbar(self.im_, ax=ax)
          ax.set(xticks=np.arange(n_classes),
                 yticks=np.arange(n_classes),
                 xticklabels=self.display_labels,
                 yticklabels=self.display_labels,
                 ylabel="True label",
                 xlabel="Predicted label")
  
          ax.set_ylim((n_classes - 0.5, -0.5))
          plt.setp(ax.get_xticklabels(), rotation=xticks_rotation)
  
          self.figure_ = fig
          self.ax_ = ax
          return self
function_tokens: def plot ( self , include_values = True , cmap = 'viridis' , xticks_rotation = 'horizontal' , values_format = None , ax = None ) : check_matplotlib_support ( "ConfusionMatrixDisplay.plot" ) import matplotlib . pyplot as plt if ax is None : fig , ax = plt . subplots ( ) else : fig = ax . figure cm = self . confusion_matrix n_classes = cm . shape [ 0 ] self . im_ = ax . imshow ( cm , interpolation = 'nearest' , cmap = cmap ) self . text_ = None cmap_min , cmap_max = self . im_ . cmap ( 0 ) , self . im_ . cmap ( 256 ) if include_values : self . text_ = np . empty_like ( cm , dtype = object ) if values_format is None : values_format = '.2g' # print text with appropriate color depending on background thresh = ( cm . max ( ) + cm . min ( ) ) / 2.0 for i , j in product ( range ( n_classes ) , range ( n_classes ) ) : color = cmap_max if cm [ i , j ] < thresh else cmap_min self . text_ [ i , j ] = ax . text ( j , i , format ( cm [ i , j ] , values_format ) , ha = "center" , va = "center" , color = color ) fig . colorbar ( self . im_ , ax = ax ) ax . set ( xticks = np . arange ( n_classes ) , yticks = np . arange ( n_classes ) , xticklabels = self . display_labels , yticklabels = self . display_labels , ylabel = "True label" , xlabel = "Predicted label" ) ax . set_ylim ( ( n_classes - 0.5 , - 0.5 ) ) plt . setp ( ax . get_xticklabels ( ) , rotation = xticks_rotation ) self . figure_ = fig self . ax_ = ax return self