class_docstr: The base metric for semantic segmentation confusion matrix based metrics.
  
  This is the base metric for other metrics such as true postive, true negative,
  false positvie and false negative.
class_docstr_tok: ["The","base","metric","for","semantic","segmentation","confusion","matrix","based","metrics",".","This","is","the","base","metric","for","other","metrics","such","as","true","postive",",","true","negative",",","false","positvie","and","false","negative","."]
docstr: Initializes PrecisionAtRecall metric.
  
  Args:
    class_ids: the class ids for calculating metrics.
    ground_truth_key: the key for storing the ground truth of encoded image
      with class ids.
    prediction_key: the key for storing the predictions of encoded image with
      class ids.
    decode_ground_truth: If true, the ground truth is assumed to be bytes of
      images and will be decoded. By default it is true assuming the label is
      the bytes of image.
    decode_prediction: If true, the prediction is assumed to be bytes of
      images and will be decoded. By default it is false assuming the model
      outputs numpy arrays or tensors.
    ignore_ground_truth_id: (Optional) The id of ground truth to be ignored.
    name: (Optional) string name of the metric instance.
docstr_tok: ["Initializes","PrecisionAtRecall","metric",".","Args",":","class_ids",":","the","class","ids","for","calculating","metrics",".","ground_truth_key",":","the","key","for","storing","the","ground","truth","of","encoded","image","with","class","ids",".","prediction_key",":","the","key","for","storing","the","predictions","of","encoded","image","with","class","ids",".","decode_ground_truth",":","If","true",",","the","ground","truth","is","assumed","to","be","bytes","of","images","and","will","be","decoded",".","By","default","it","is","true","assuming","the","label","is","the","bytes","of","image",".","decode_prediction",":","If","true",",","the","prediction","is","assumed","to","be","bytes","of","images","and","will","be","decoded",".","By","default","it","is","false","assuming","the","model","outputs","numpy","arrays","or","tensors",".","ignore_ground_truth_id",":","(","Optional",")","The","id","of","ground","truth","to","be","ignored",".","name",":","(","Optional",")","string","name","of","the","metric","instance","."]
code: def __init__(
      self,
      class_ids: List[int],
      ground_truth_key: str,
      prediction_key: str,
      decode_ground_truth: bool = True,
      decode_prediction: bool = False,
      ignore_ground_truth_id: Optional[int] = None,
      name: Optional[str] = None,
  ):
      """Initializes PrecisionAtRecall metric.
  
      Args:
        class_ids: the class ids for calculating metrics.
        ground_truth_key: the key for storing the ground truth of encoded image
          with class ids.
        prediction_key: the key for storing the predictions of encoded image with
          class ids.
        decode_ground_truth: If true, the ground truth is assumed to be bytes of
          images and will be decoded. By default it is true assuming the label is
          the bytes of image.
        decode_prediction: If true, the prediction is assumed to be bytes of
          images and will be decoded. By default it is false assuming the model
          outputs numpy arrays or tensors.
        ignore_ground_truth_id: (Optional) The id of ground truth to be ignored.
        name: (Optional) string name of the metric instance.
      """
  
      super().__init__(
          metric_util.merge_per_key_computations(
              self._metric_computations
          ),
          name=name,
          class_ids=class_ids,
          ground_truth_key=ground_truth_key,
          prediction_key=prediction_key,
          decode_ground_truth=decode_ground_truth,
          decode_prediction=decode_prediction,
          ignore_ground_truth_id=ignore_ground_truth_id,
      )
  
imports: import abc
  from typing import Any, Dict, Iterable, List, Optional, Union
  import apache_beam
  import numpy
  from tensorflow_model_analysis.contrib.aggregates import binary_confusion_matrices
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import preprocessors
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 1 to create a new SemanticSegmentationConfusionMatrixMetricBase object from inherited base classes: metric_types with example: obj = SemanticSegmentationConfusionMatrixMetricBase(class_ids, ground_truth_key, prediction_key, decode_ground_truth, decode_prediction, ignore_ground_truth_id, name)