class_docstr: Multi-class confusion matrix plot.
  
  Computes weighted example counts for all combinations of actual / (top)
  predicted classes.
  
  The inputs are assumed to contain a single positive label per example (i.e.
  only one class can be true at a time) while the predictions are assumed to sum
  to 1.0.
docstr: Initializes multi-class confusion matrix.
  
  Args:
    thresholds: Optional thresholds. If the top prediction is less than a
      threshold then the associated example will be assumed to have no
      prediction associated with it (the predicted_class_id will be set to
      tfma.metrics.NO_PREDICTED_CLASS_ID). Only one of
      either thresholds or num_thresholds should be used. If both are unset,
      then [0.0] will be assumed.
    num_thresholds: Number of thresholds to use. The thresholds will be evenly
      spaced between 0.0 and 1.0 and inclusive of the boundaries (i.e. to
      configure the thresholds to [0.0, 0.25, 0.5, 0.75, 1.0], the parameter
      should be set to 5). Only one of either thresholds or num_thresholds
      should be used.
    name: Metric name.
docstr_tok: ["Initializes","multi-class","confusion","matrix",".","Args",":","thresholds",":","Optional","thresholds",".","If","the","top","prediction","is","less","than","a","threshold","then","the","associated","example","will","be","assumed","to","have","no","prediction","associated","with","it","(","the","predicted_class_id","will","be","set","to","tfma.metrics.NO_PREDICTED_CLASS_ID",")",".","Only","one","of","either","thresholds","or","num_thresholds","should","be","used",".","If","both","are","unset",",","then","[","0.0","]","will","be","assumed",".","num_thresholds",":","Number","of","thresholds","to","use",".","The","thresholds","will","be","evenly","spaced","between","0.0","and","1.0","and","inclusive","of","the","boundaries","(","i.e",".","to","configure","the","thresholds","to","[","0.0",",","0.25",",","0.5",",","0.75",",","1.0","]",",","the","parameter","should","be","set","to","5",")",".","Only","one","of","either","thresholds","or","num_thresholds","should","be","used",".","name",":","Metric","name","."]
code: def __init__(
      self,
      thresholds: Optional[List[float]] = None,
      num_thresholds: Optional[int] = None,
      name: str = MULTI_CLASS_CONFUSION_MATRIX_PLOT_NAME,
  ):
      """Initializes multi-class confusion matrix.
  
      Args:
        thresholds: Optional thresholds. If the top prediction is less than a
          threshold then the associated example will be assumed to have no
          prediction associated with it (the predicted_class_id will be set to
          tfma.metrics.NO_PREDICTED_CLASS_ID). Only one of
          either thresholds or num_thresholds should be used. If both are unset,
          then [0.0] will be assumed.
        num_thresholds: Number of thresholds to use. The thresholds will be evenly
          spaced between 0.0 and 1.0 and inclusive of the boundaries (i.e. to
          configure the thresholds to [0.0, 0.25, 0.5, 0.75, 1.0], the parameter
          should be set to 5). Only one of either thresholds or num_thresholds
          should be used.
        name: Metric name.
      """
      super().__init__(
          metric_util.merge_per_key_computations(
              _multi_class_confusion_matrix_plot
          ),
          thresholds=thresholds,
          num_thresholds=num_thresholds,
          name=name,
      )
  
file_path: model-analysis/tensorflow_model_analysis/metrics/multi_class_confusion_matrix_plot.py
imports: from typing import Dict, List, Optional
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import multi_class_confusion_matrix_metrics
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
label_desc: Use image node_id 1 to create a new MultiClassConfusionMatrixPlot object from inherited base classes: metric_types with example: obj = MultiClassConfusionMatrixPlot(thresholds, num_thresholds, name)