class_docstr: Multi-class F-Beta score with different betas per class.
  
  The multiclass F-Beta score is the arithmetic average of the binary F-Beta scores of each class.
  The mean can be weighted by providing class weights.
  
  Parameters
  ----------
  betas
      Weight of precision in the harmonic mean of each class.
  weights
      Class weights. If not provided then uniform weights will be used.
  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.MultiFBeta(
  ...     betas={0: 0.25, 1: 1, 2: 4},
  ...     weights={0: 1, 1: 1, 2: 2}
  ... )
  
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  ...     print(metric)
  MultiFBeta: 100.00%
  MultiFBeta: 25.76%
  MultiFBeta: 62.88%
  MultiFBeta: 62.88%
  MultiFBeta: 46.88%
class_docstr_tok: ["Multi-class","F-Beta","score","with","different","betas","per","class",".","The","multiclass","F-Beta","score","is","the","arithmetic","average","of","the","binary","F-Beta","scores","of","each","class",".","The","mean","can","be","weighted","by","providing","class","weights",".","Parameters","--","--","--","--","--","betas","Weight","of","precision","in","the","harmonic","mean","of","each","class",".","weights","Class","weights",".","If","not","provided","then","uniform","weights","will","be","used",".","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.MultiFBeta","(","...","betas=","{","0",":","0.25",",","1",":","1",",","2",":","4","}",",","...","weights=","{","0",":","1",",","1",":","1",",","2",":","2","}","...",")",">",">",">","for","yt",",","yp","in","zip","(","y_true",",","y_pred",")",":","...","metric.update","(","yt",",","yp",")","...","print","(","metric",")","MultiFBeta",":","100.00","%","MultiFBeta",":","25.76","%","MultiFBeta",":","62.88","%","MultiFBeta",":","62.88","%","MultiFBeta",":","46.88","%"]
code: def __init__(self, betas, weights, cm=None):
      super().__init__(cm)
      self.betas = betas
      self.weights = (
          collections.defaultdict(functools.partial(int, 1))
          if weights is None
          else weights
      )
  
imports: from __future__ import annotations
  import collections
  import functools
  from river import metrics
label_desc: Use image node_id 1 to create a new MultiFBeta object from inherited base classes: metrics.base with example: obj = MultiFBeta(betas, weights, cm)