class_docstr: Macro-average recall score.
  
  Parameters
  ----------
  cm
      This parameter allows sharing the same confusion matrix between multiple metrics. Sharing a
      confusion matrix reduces the amount of storage and computation time.
  
  Examples
  --------
  
  >>> from river import metrics
  
  >>> y_true = [0, 1, 2, 2, 2]
  >>> y_pred = [0, 0, 2, 2, 1]
  
  >>> metric = metrics.MacroRecall()
  
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  ...     print(metric)
  MacroRecall: 100.00%
  MacroRecall: 50.00%
  MacroRecall: 66.67%
  MacroRecall: 66.67%
  MacroRecall: 55.56%
class_docstr_tok: ["Macro-average","recall","score",".","Parameters","--","--","--","--","--","cm","This","parameter","allows","sharing","the","same","confusion","matrix","between","multiple","metrics",".","Sharing","a","confusion","matrix","reduces","the","amount","of","storage","and","computation","time",".","Examples","--","--","--","--",">",">",">","from","river","import","metrics",">",">",">","y_true","=","[","0",",","1",",","2",",","2",",","2","]",">",">",">","y_pred","=","[","0",",","0",",","2",",","2",",","1","]",">",">",">","metric","=","metrics.MacroRecall","(",")",">",">",">","for","yt",",","yp","in","zip","(","y_true",",","y_pred",")",":","...","metric.update","(","yt",",","yp",")","...","print","(","metric",")","MacroRecall",":","100.00","%","MacroRecall",":","50.00","%","MacroRecall",":","66.67","%","MacroRecall",":","66.67","%","MacroRecall",":","55.56","%"]
code: def get(self):
      total = 0
      for c in self.cm.classes:
          try:
              total += self.cm[c][c] / self.cm.sum_row[c]
          except ZeroDivisionError:
              continue
      try:
          return total / len(self.cm.classes)
      except ZeroDivisionError:
          return 0.0
  
file_path: river/river/metrics/recall.py
imports: from __future__ import annotations
  from river import metrics
label_desc: Use image node_id 1 for calling the MacroRecall obj's underlying member method code with example usage: obj.get() and returns: unknown, int