class_docstr: Plot confusion matrix.
  
  Examples
  --------
  .. plot:: ../examples/confusion_matrix_oop.py
  
  Notes
  -----
  .. versionchanged:: 0.9
      Added ``cmap`` argument
docstr: Notes
  -----
  .. versionchanged:: 0.9
      Added ``cmap`` argument.
docstr_tok: ["Notes","--","--","-","..","versionchanged",":",":","0.9","Added","``","cmap","``","argument","."]
code: def from_raw_data(
      cls, y_true, y_pred, target_names=None, normalize=False, cmap=None
  ):
      """
  
      Notes
      -----
      .. versionchanged:: 0.9
          Added ``cmap`` argument.
      """
      target_names, cmap = _confusion_matrix_validate(
          y_true, y_pred, target_names, cmap=cmap
      )
      cm = _confusion_matrix(y_true, y_pred, normalize)
      return cls(
          cm, target_names=target_names, normalize=normalize, cmap=cmap
      ).plot()
  
imports: import json
  from pathlib import Path
  import numpy
  import matplotlib.pyplot
  from sklearn.metrics import confusion_matrix
  from sklearn_evaluation import __version__
  from ..telemetry import SKLearnEvaluationLogger
  from ..plot.matplotlib import bar
  from ..metrics import precision_at
  from ..None import compute
  from ..util import is_column_vector, is_row_vector, default_heatmap
  from sklearn_evaluation.plot.plot import AbstractPlot, AbstractComposedPlot
  from ..plot import _matrix
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 7 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.from_raw_data(cls, y_true, y_pred, target_names, normalize, cmap) and returns: cls