class_docstr: Macro-average F1 score.
  
  This works by computing the F1 score per class, and then performs a global average.
  
  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.MacroF1()
  
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  ...     print(metric)
  MacroF1: 100.00%
  MacroF1: 33.33%
  MacroF1: 55.56%
  MacroF1: 55.56%
  MacroF1: 48.89%
class_docstr_tok: ["Macro-average","F1","score",".","This","works","by","computing","the","F1","score","per","class",",","and","then","performs","a","global","average",".","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.MacroF1","(",")",">",">",">","for","yt",",","yp","in","zip","(","y_true",",","y_pred",")",":","...","metric.update","(","yt",",","yp",")","...","print","(","metric",")","MacroF1",":","100.00","%","MacroF1",":","33.33","%","MacroF1",":","55.56","%","MacroF1",":","55.56","%","MacroF1",":","48.89","%"]
code: def __init__(self, cm=None):
      super().__init__(beta=1.0, cm=cm)
  
imports: from __future__ import annotations
  import collections
  import functools
  from river import metrics
label_desc: Use image node_id 1 to create a new MacroF1 object from inherited base classes: MacroFBeta with example: obj = MacroF1(cm)