class_docstr: Multi-class confusion matrix metrics at thresholds.
  
  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.
class_docstr_tok: ["Multi-class","confusion","matrix","metrics","at","thresholds",".","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, defaults to 0.5 if not specified. 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 NO_PREDICTED_CLASS_ID).
    name: Metric name.
docstr_tok: ["Initializes","multi-class","confusion","matrix",".","Args",":","thresholds",":","Optional","thresholds",",","defaults","to","0.5","if","not","specified",".","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","NO_PREDICTED_CLASS_ID",")",".","name",":","Metric","name","."]
code: def __init__(
      self,
      thresholds: Optional[List[float]] = None,
      name: str = MULTI_CLASS_CONFUSION_MATRIX_AT_THRESHOLDS_NAME,
  ):
      """Initializes multi-class confusion matrix.
  
      Args:
        thresholds: Optional thresholds, defaults to 0.5 if not specified. 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 NO_PREDICTED_CLASS_ID).
        name: Metric name.
      """
      super().__init__(
          metric_util.merge_per_key_computations(
              _multi_class_confusion_matrix_at_thresholds
          ),
          thresholds=thresholds,
          name=name,
      )
  
imports: from typing import Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  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 MultiClassConfusionMatrixAtThresholds object from inherited base classes: metric_types with example: obj = MultiClassConfusionMatrixAtThresholds(thresholds, name)