class_docstr: Confusion Matrix visualization.
  
  It is recommend to use
  :func:`~sklearn.metrics.ConfusionMatrixDisplay.from_estimator` or
  :func:`~sklearn.metrics.ConfusionMatrixDisplay.from_predictions` to
  create a :class:`ConfusionMatrixDisplay`. All parameters are stored as
  attributes.
  
  Read more in the :ref:`User Guide <visualizations>`.
  
  Parameters
  ----------
  confusion_matrix : ndarray of shape (n_classes, n_classes)
      Confusion matrix.
  
  display_labels : ndarray of shape (n_classes,), default=None
      Display labels for plot. If None, display labels are set from 0 to
      `n_classes - 1`.
  
  Attributes
  ----------
  im_ : matplotlib AxesImage
      Image representing the confusion matrix.
  
  text_ : ndarray of shape (n_classes, n_classes), dtype=matplotlib Text,             or None
      Array of matplotlib axes. `None` if `include_values` is false.
  
  ax_ : matplotlib Axes
      Axes with confusion matrix.
  
  figure_ : matplotlib Figure
      Figure containing the confusion matrix.
  
  See Also
  --------
  confusion_matrix : Compute Confusion Matrix to evaluate the accuracy of a
      classification.
  ConfusionMatrixDisplay.from_estimator : Plot the confusion matrix
      given an estimator, the data, and the label.
  ConfusionMatrixDisplay.from_predictions : Plot the confusion matrix
      given the true and predicted labels.
  
  Examples
  --------
  >>> import matplotlib.pyplot as plt
  >>> from sklearn.datasets import make_classification
  >>> from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay
  >>> from sklearn.model_selection import train_test_split
  >>> from sklearn.svm import SVC
  >>> X, y = make_classification(random_state=0)
  >>> X_train, X_test, y_train, y_test = train_test_split(X, y,
  ...                                                     random_state=0)
  >>> clf = SVC(random_state=0)
  >>> clf.fit(X_train, y_train)
  SVC(random_state=0)
  >>> predictions = clf.predict(X_test)
  >>> cm = confusion_matrix(y_test, predictions, labels=clf.classes_)
  >>> disp = ConfusionMatrixDisplay(confusion_matrix=cm,
  ...                               display_labels=clf.classes_)
  >>> disp.plot()
  <...>
  >>> plt.show()
class_docstr_tok: ["Confusion","Matrix","visualization",".","It","is","recommend","to","use",":","func",":","`","~sklearn.metrics.ConfusionMatrixDisplay.from_estimator","`","or",":","func",":","`","~sklearn.metrics.ConfusionMatrixDisplay.from_predictions","`","to","create","a",":","class",":","`","ConfusionMatrixDisplay","`",".","All","parameters","are","stored","as","attributes",".","Read","more","in","the",":","ref",":","`","User","Guide","<","visualizations",">","`",".","Parameters","--","--","--","--","--","confusion_matrix",":","ndarray","of","shape","(","n_classes",",","n_classes",")","Confusion","matrix",".","display_labels",":","ndarray","of","shape","(","n_classes",",",")",",","default=None","Display","labels","for","plot",".","If","None",",","display","labels","are","set","from","0","to","`","n_classes","-","1","`",".","Attributes","--","--","--","--","--","im_",":","matplotlib","AxesImage","Image","representing","the","confusion","matrix",".","text_",":","ndarray","of","shape","(","n_classes",",","n_classes",")",",","dtype=matplotlib","Text",",","or","None","Array","of","matplotlib","axes",".","`","None","`","if","`","include_values","`","is","false",".","ax_",":","matplotlib","Axes","Axes","with","confusion","matrix",".","figure_",":","matplotlib","Figure","Figure","containing","the","confusion","matrix",".","See","Also","--","--","--","--","confusion_matrix",":","Compute","Confusion","Matrix","to","evaluate","the","accuracy","of","a","classification",".","ConfusionMatrixDisplay.from_estimator",":","Plot","the","confusion","matrix","given","an","estimator",",","the","data",",","and","the","label",".","ConfusionMatrixDisplay.from_predictions",":","Plot","the","confusion","matrix","given","the","true","and","predicted","labels",".","Examples","--","--","--","--",">",">",">","import","matplotlib.pyplot","as","plt",">",">",">","from","sklearn.datasets","import","make_classification",">",">",">","from","sklearn.metrics","import","confusion_matrix",",","ConfusionMatrixDisplay",">",">",">","from","sklearn.model_selection","import","train_test_split",">",">",">","from","sklearn.svm","import","SVC",">",">",">","X",",","y","=","make_classification","(","random_state=0",")",">",">",">","X_train",",","X_test",",","y_train",",","y_test","=","train_test_split","(","X",",","y",",","...","random_state=0",")",">",">",">","clf","=","SVC","(","random_state=0",")",">",">",">","clf.fit","(","X_train",",","y_train",")","SVC","(","random_state=0",")",">",">",">","predictions","=","clf.predict","(","X_test",")",">",">",">","cm","=","confusion_matrix","(","y_test",",","predictions",",","labels=clf.classes_",")",">",">",">","disp","=","ConfusionMatrixDisplay","(","confusion_matrix=cm",",","...","display_labels=clf.classes_",")",">",">",">","disp.plot","(",")","<","...",">",">",">",">","plt.show","(",")"]
code: def __init__(self, confusion_matrix, *, display_labels=None):
      self.confusion_matrix = confusion_matrix
      self.display_labels = display_labels
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/metrics/_plot/confusion_matrix.py
imports: from itertools import product
  import numpy
  from ...base import is_classifier
  from ...utils import check_matplotlib_support
  from ...utils.multiclass import unique_labels
  from ..None import confusion_matrix
label_desc: Use image node_id 1 to create a new ConfusionMatrixDisplay object  with example: obj = ConfusionMatrixDisplay(confusion_matrix)