class_docstr: Abstract class for confusion matrix
  
  You shouldn't instantiate this class.
  You might instantiate ConfusionMatrix or BinaryConfusionMatrix classes
class_docstr_tok: ["Abstract","class","for","confusion","matrix","You","should","n't","instantiate","this","class",".","You","might","instantiate","ConfusionMatrix","or","BinaryConfusionMatrix","classes"]
docstr: Returns a DataFrame with class statistics
docstr_tok: ["Returns","a","DataFrame","with","class","statistics"]
code: def stats_class(self):
      """
      Returns a DataFrame with class statistics
      """
      # stats = ['TN', 'FP', 'FN', 'TP']
      # df = pd.DataFrame(columns=self.classes, index=stats)
      df = pd.DataFrame(columns=self.classes)
  
      # ToDo Avoid these for loops
  
      for cls in self.classes:
          binary_cm = self.binarize(cls)
          binary_cm_stats = binary_cm.stats()
          for key, value in binary_cm_stats.items():
              df.loc[key, cls] = value  # binary_cm_stats
  
      d_name = {
          "population": "Population",
          "P": "P: Condition positive",
          "N": "N: Condition negative",
          "PositiveTest": "Test outcome positive",
          "NegativeTest": "Test outcome negative",
          "TP": "TP: True Positive",
          "TN": "TN: True Negative",
          "FP": "FP: False Positive",
          "FN": "FN: False Negative",
          "TPR": "TPR: (Sensitivity, hit rate, recall)",  # True Positive Rate
          "TNR": "TNR=SPC: (Specificity)",  # True Negative Rate
          "PPV": "PPV: Pos Pred Value (Precision)",
          "NPV": "NPV: Neg Pred Value",
          "prevalence": "Prevalence",
          # 'xxx': 'xxx: Detection Rate',
          # 'xxx': 'xxx: Detection Prevalence',
          # 'xxx': 'xxx: Balanced Accuracy',
          "FPR": "FPR: False-out",
          "FDR": "FDR: False Discovery Rate",
          "FNR": "FNR: Miss Rate",
          "ACC": "ACC: Accuracy",
          "F1_score": "F1 score",
          "MCC": "MCC: Matthews correlation coefficient",
          "informedness": "Informedness",
          "markedness": "Markedness",
          "LRP": "LR+: Positive likelihood ratio",
          "LRN": "LR-: Negative likelihood ratio",
          "DOR": "DOR: Diagnostic odds ratio",
          "FOR": "FOR: False omission rate",
      }
      df.index = df.index.map(
          lambda id: self._name_from_dict(id, d_name)
      )
  
      return df
  
imports: import numpy
  import pandas
  import collections
  import pandas_ml
  from pandas_ml.confusion_matrix.stats import binom_interval, class_agreement, prop_test
label_desc: Use image node_id 22 for calling the ConfusionMatrixAbstract obj's underlying member method code with example usage: obj.stats_class() and returns: df