class_docstr: Calculate confusion matrix metrics for each subgroup
  
  Parameters
  -----------
  sub_confusion_matrix : SubgroupConfusionMatrix
      Object with calculated confusion matrix values for each subgroup
  
  Attributes
  -----------
  subgroup_confusion_matrix_metrics : dict
      Dictionary with confusion matrix metrics for each subgroup
code: def to_vertical_DataFrame(self) -> pd.DataFrame:
      columns = ["metric", "subgroup", "score"]
      data = pd.DataFrame(columns=columns)
      metrics = self.subgroup_confusion_matrix_metrics
      for subgroup in metrics.keys():
          metric = metrics.get(subgroup)
          subgroup_vec = np.repeat(subgroup, len(metric))
          sub_df = pd.DataFrame(
              {
                  "metric": metric.keys(),
                  "subgroup": subgroup_vec,
                  "score": metric.values(),
              }
          )
          data = pd.concat([data, sub_df])
      return data
  
imports: from copy import deepcopy
  import numpy
  import pandas
  from .None import checks
  from ...None import _global_checks
  from ..._explainer import helper
  from ...model_explanations._model_performance import utils
label_desc: Use image node_id 2 for calling the SubgroupConfusionMatrixMetrics obj's underlying member method code with example usage: obj.to_vertical_DataFrame() and returns: data