class_docstr: Aggregates label quality scores across different classes to produce one score per example in multi-label classification tasks.
  
  Parameters
  ----------
  base_scorer:
      The method to compute the label quality scores for each class.
  
      See the documentation for the ClassLabelScorer enum for more details.
  
  aggregator:
      The method to aggregate the label quality scores for each class into a single score for each datapoint.
  
      Defaults to the EMA (exponential moving average) aggregator with forgetting factor ``alpha=0.8``.
  
      See the documentation for the Aggregator class for more details.
  
      See also
      --------
      exponential_moving_average
  
  strict:
      Flag for performing strict validation of the input data.
class_docstr_tok: ["Aggregates","label","quality","scores","across","different","classes","to","produce","one","score","per","example","in","multi-label","classification","tasks",".","Parameters","--","--","--","--","--","base_scorer",":","The","method","to","compute","the","label","quality","scores","for","each","class",".","See","the","documentation","for","the","ClassLabelScorer","enum","for","more","details",".","aggregator",":","The","method","to","aggregate","the","label","quality","scores","for","each","class","into","a","single","score","for","each","datapoint",".","Defaults","to","the","EMA","(","exponential","moving","average",")","aggregator","with","forgetting","factor","``","alpha=0.8","``",".","See","the","documentation","for","the","Aggregator","class","for","more","details",".","See","also","--","--","--","--","exponential_moving_average","strict",":","Flag","for","performing","strict","validation","of","the","input","data","."]
docstr: Aggregates the label quality scores for each class into a single overall label quality score for each example.
  
  Parameters
  ----------
  class_label_quality_scores:
      A 2D array of shape (n_samples, n_labels) with the label quality scores for each class.
  
      See also
      --------
      get_class_label_quality_scores
  
  kwargs:
      Additional keyword arguments to pass to the aggregator.
  
  Returns
  -------
  scores:
      A 1D array of shape (n_samples,) with the quality scores for each datapoint.
  
  Examples
  --------
  >>> from cleanlab.internal.multilabel_scorer import MultilabelScorer
  >>> import numpy as np
  >>> class_label_quality_scores = np.array([[0.9, 0.9, 0.3],[0.4, 0.9, 0.6]])
  >>> scorer = MultilabelScorer() # Use the default aggregator (exponential moving average) with default parameters.
  >>> scores = scorer.aggregate(class_label_quality_scores)
  >>> scores
  array([0.42, 0.452])
  >>> new_scores = scorer.aggregate(class_label_quality_scores, alpha=0.5) # Use the default aggregator with custom parameters.
  >>> new_scores
  array([0.6, 0.575])
  
  Warning
  -------
  Make sure that keyword arguments correspond to the aggregation function used.
  I.e. the ``exponential_moving_average`` function supports an ``alpha`` keyword argument, but ``np.min`` does not.
docstr_tok: ["Aggregates","the","label","quality","scores","for","each","class","into","a","single","overall","label","quality","score","for","each","example",".","Parameters","--","--","--","--","--","class_label_quality_scores",":","A","2D","array","of","shape","(","n_samples",",","n_labels",")","with","the","label","quality","scores","for","each","class",".","See","also","--","--","--","--","get_class_label_quality_scores","kwargs",":","Additional","keyword","arguments","to","pass","to","the","aggregator",".","Returns","--","--","--","-","scores",":","A","1D","array","of","shape","(","n_samples",",",")","with","the","quality","scores","for","each","datapoint",".","Examples","--","--","--","--",">",">",">","from","cleanlab.internal.multilabel_scorer","import","MultilabelScorer",">",">",">","import","numpy","as","np",">",">",">","class_label_quality_scores","=","np.array","(","[","[","0.9",",","0.9",",","0.3","]",",","[","0.4",",","0.9",",","0.6","]","]",")",">",">",">","scorer","=","MultilabelScorer","(",")","#","Use","the","default","aggregator","(","exponential","moving","average",")","with","default","parameters",".",">",">",">","scores","=","scorer.aggregate","(","class_label_quality_scores",")",">",">",">","scores","array","(","[","0.42",",","0.452","]",")",">",">",">","new_scores","=","scorer.aggregate","(","class_label_quality_scores",",","alpha=0.5",")","#","Use","the","default","aggregator","with","custom","parameters",".",">",">",">","new_scores","array","(","[","0.6",",","0.575","]",")","Warning","--","--","--","-","Make","sure","that","keyword","arguments","correspond","to","the","aggregation","function","used",".","I.e",".","the","``","exponential_moving_average","``","function","supports","an","``","alpha","``","keyword","argument",",","but","``","np.min","``","does","not","."]
code: def aggregate(
      self,
      class_label_quality_scores: np.ndarray,
      **kwargs,
  ) -> np.ndarray:
      """Aggregates the label quality scores for each class into a single overall label quality score for each example.
  
      Parameters
      ----------
      class_label_quality_scores:
          A 2D array of shape (n_samples, n_labels) with the label quality scores for each class.
  
          See also
          --------
          get_class_label_quality_scores
  
      kwargs:
          Additional keyword arguments to pass to the aggregator.
  
      Returns
      -------
      scores:
          A 1D array of shape (n_samples,) with the quality scores for each datapoint.
  
      Examples
      --------
      >>> from cleanlab.internal.multilabel_scorer import MultilabelScorer
      >>> import numpy as np
      >>> class_label_quality_scores = np.array([[0.9, 0.9, 0.3],[0.4, 0.9, 0.6]])
      >>> scorer = MultilabelScorer() # Use the default aggregator (exponential moving average) with default parameters.
      >>> scores = scorer.aggregate(class_label_quality_scores)
      >>> scores
      array([0.42, 0.452])
      >>> new_scores = scorer.aggregate(class_label_quality_scores, alpha=0.5) # Use the default aggregator with custom parameters.
      >>> new_scores
      array([0.6, 0.575])
  
      Warning
      -------
      Make sure that keyword arguments correspond to the aggregation function used.
      I.e. the ``exponential_moving_average`` function supports an ``alpha`` keyword argument, but ``np.min`` does not.
      """
      return self.aggregator(class_label_quality_scores, **kwargs)
  
imports: from enum import Enum
  from typing import Callable, Dict, Optional, Union
  import numpy
  from sklearn.model_selection import cross_val_predict
  from cleanlab.internal.multilabel_utils import _is_multilabel, stack_complement
  from cleanlab.internal.label_quality_utils import _subtract_confident_thresholds
  from cleanlab.internal.numerics import softmax
  from cleanlab.rank import get_self_confidence_for_each_label, get_normalized_margin_for_each_label, get_confidence_weighted_entropy_for_each_label
label_desc: Use image node_id 3 for calling the MultilabelScorer obj's underlying member method code with example usage: obj.aggregate(class_label_quality_scores) and returns: self