class_docstr: Metric parser for model monitor model quality bianry/muliti-classification data
class_docstr_tok: ["Metric","parser","for","model","monitor","model","quality","bianry\/muliti-classification","data"]
docstr: Implement ParserBase._parse.
  
  Args:
      json_data (dict): Raw metric data.
docstr_tok: ["Implement","ParserBase._parse",".","Args",":","json_data","(","dict",")",":","Raw","metric","data","."]
code: def _parse(self, json_data: dict):
      """Implement ParserBase._parse.
  
      Args:
          json_data (dict): Raw metric data.
      """
      result = {"metric_groups": []}
      for group_name, group_data in json_data.items():
          metric_data = []
          if group_name not in (
              "binary_classification_metrics",
              "multiclass_classification_metrics",
          ):
              continue
          for metric_name, raw_data in group_data.items():
              metric_data.extend(
                  self._parse_confusion_matrix(metric_name, raw_data)
              )
              metric_data.extend(
                  self._parse_receiver_operating_characteristic_curve(
                      metric_name, raw_data
                  )
              )
              metric_data.extend(
                  self._parse_precision_recall_curve(
                      metric_name, raw_data
                  )
              )
              if metric_name not in [
                  "confusion_matrix",
                  "receiver_operating_characteristic_curve",
                  "precision_recall_curve",
              ]:
                  metric_data.extend(
                      self._parse_basic_metric(metric_name, raw_data)
                  )
          result["metric_groups"].append(
              {"name": group_name, "metric_data": metric_data}
          )
  
          return result
  
imports: from __future__ import absolute_import
  from abc import ABC, abstractmethod
  from enum import Enum
  from collections import defaultdict
  from typing import Union, List
  from sagemaker.model_card.schema_constraints import PYTHON_TYPE_TO_METRIC_VALUE_TYPE, METRIC_VALUE_TYPE_MAP, MetricTypeEnum
label_desc: Use image node_id 2 for calling the ClassificationParser obj's underlying member method code with example usage: obj._parse(json_data) and returns: result