class_docstr: Macro-average Jaccard 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.MacroJaccard()
  
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  ...     print(metric)
  MacroJaccard: 100.00%
  MacroJaccard: 25.00%
  MacroJaccard: 50.00%
  MacroJaccard: 50.00%
  MacroJaccard: 38.89%
code: def get(self):
      total = 0
      for c in self.cm.classes:
          try:
              tp = self.cm.true_positives(c)
              fp = self.cm.false_positives(c)
              fn = self.cm.false_negatives(c)
              total += tp / (tp + fp + fn)
          except ZeroDivisionError:
              continue
      try:
          return total / len(self.cm.classes)
      except ZeroDivisionError:
          return 0.0
  
file_path: river/river/metrics/jaccard.py
imports: from __future__ import annotations
  from river import metrics
label_desc: Use image node_id 1 for calling the MacroJaccard obj's underlying member method code with example usage: obj.get() and returns: unknown, int