class_docstr: Micro-average F1 score.
  
  This computes the F1 score by merging all the predictions and true labels, and then computes a
  global F1 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, 0]
  >>> y_pred = [0, 1, 1, 2, 1]
  
  >>> metric = metrics.MicroF1()
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  
  >>> metric
  MicroF1: 60.00%
  
  References
  ----------
  [^1]: [Why are precision, recall and F1 score equal when using micro averaging in a multi-class problem?](https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/)
class_docstr_tok: ["Micro-average","F1","score",".","This","computes","the","F1","score","by","merging","all","the","predictions","and","true","labels",",","and","then","computes","a","global","F1","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",",","0","]",">",">",">","y_pred","=","[","0",",","1",",","1",",","2",",","1","]",">",">",">","metric","=","metrics.MicroF1","(",")",">",">",">","for","yt",",","yp","in","zip","(","y_true",",","y_pred",")",":","...","metric.update","(","yt",",","yp",")",">",">",">","metric","MicroF1",":","60.00","%","References","--","--","--","--","--","[","^1","]",":","[","Why","are","precision",",","recall","and","F1","score","equal","when","using","micro","averaging","in","a","multi-class","problem","?","]","(","https",":","\/\/simonhessner.de\/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem\/",")"]
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 MicroF1 object from inherited base classes: MicroFBeta with example: obj = MicroF1(cm)