class_docstr: Examples
  --------
  .. plot:: ../examples/ClassificationReport.py
code: def __init__(
      self,
      y_true,
      y_pred,
      *,
      target_names=None,
      sample_weight=None,
      zero_division=0,
      matrix=None,
      keys=None,
  ):
      if y_true is not None and matrix is None:
          warn(
              "ClassificationReport will change its signature in version 0.10"
              ", please use ClassificationReport.from_raw_data",
              FutureWarning,
              stacklevel=2,
          )
  
      self.figure = plt.figure()
      ax = self.figure.add_subplot()
  
      if matrix is not None and matrix is not False:
          self.matrix = matrix
          self.keys = keys
          self.target_names = target_names
      else:
          (
              self.matrix,
              self.keys,
              self.target_names,
          ) = _classification_report(
              y_true,
              y_pred,
              target_names=target_names,
              sample_weight=sample_weight,
              zero_division=zero_division,
          )
  
      _classification_report_plot(
          self.matrix, self.keys, self.target_names, ax
      )
  
imports: from warnings import warn
  from pathlib import Path
  import json
  import numpy
  import matplotlib.pyplot
  from sklearn.metrics import classification_report
  from ..telemetry import SKLearnEvaluationLogger
  from sklearn_evaluation.plot.classification import _add_values_to_matrix
  from sklearn_evaluation.util import default_heatmap
  from sklearn_evaluation.plot.plot import Plot
  from sklearn_evaluation.plot import _matrix
  from sklearn_evaluation import __version__
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 1 to create a new ClassificationReport object from inherited base classes: Plot with example: obj = ClassificationReport(y_true, y_pred)