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: Computes separate label quality scores for each class.
  
  Parameters
  ----------
  labels:
      A 2D array of shape (n_samples, n_labels) with binary labels.
  
  pred_probs:
      A 2D array of shape (n_samples, n_labels) with predicted probabilities.
  
  base_scorer_kwargs:
      Keyword arguments to pass to the base scoring-function.
  
  Returns
  -------
  class_label_quality_scores:
      A 2D array of shape (n_samples, n_labels) with the quality scores for each label.
  
  Examples
  --------
  >>> from cleanlab.internal.multilabel_scorer import MultilabelScorer
  >>> import numpy as np
  >>> labels = np.array([[0, 1, 0], [1, 0, 1]])
  >>> pred_probs = np.array([[0.1, 0.9, 0.7], [0.4, 0.1, 0.6]])
  >>> scorer = MultilabelScorer() # Use the default base scorer (SELF_CONFIDENCE)
  >>> class_label_quality_scores = scorer.get_label_quality_scores_per_class(labels, pred_probs)
  >>> class_label_quality_scores
  array([[0.9, 0.9, 0.3],
         [0.4, 0.9, 0.6]])
docstr_tok: ["Computes","separate","label","quality","scores","for","each","class",".","Parameters","--","--","--","--","--","labels",":","A","2D","array","of","shape","(","n_samples",",","n_labels",")","with","binary","labels",".","pred_probs",":","A","2D","array","of","shape","(","n_samples",",","n_labels",")","with","predicted","probabilities",".","base_scorer_kwargs",":","Keyword","arguments","to","pass","to","the","base","scoring-function",".","Returns","--","--","--","-","class_label_quality_scores",":","A","2D","array","of","shape","(","n_samples",",","n_labels",")","with","the","quality","scores","for","each","label",".","Examples","--","--","--","--",">",">",">","from","cleanlab.internal.multilabel_scorer","import","MultilabelScorer",">",">",">","import","numpy","as","np",">",">",">","labels","=","np.array","(","[","[","0",",","1",",","0","]",",","[","1",",","0",",","1","]","]",")",">",">",">","pred_probs","=","np.array","(","[","[","0.1",",","0.9",",","0.7","]",",","[","0.4",",","0.1",",","0.6","]","]",")",">",">",">","scorer","=","MultilabelScorer","(",")","#","Use","the","default","base","scorer","(","SELF_CONFIDENCE",")",">",">",">","class_label_quality_scores","=","scorer.get_label_quality_scores_per_class","(","labels",",","pred_probs",")",">",">",">","class_label_quality_scores","array","(","[","[","0.9",",","0.9",",","0.3","]",",","[","0.4",",","0.9",",","0.6","]","]",")"]
code: def get_class_label_quality_scores(
      self,
      labels: np.ndarray,
      pred_probs: np.ndarray,
      base_scorer_kwargs: Optional[dict] = None,
  ) -> np.ndarray:
      """Computes separate label quality scores for each class.
  
      Parameters
      ----------
      labels:
          A 2D array of shape (n_samples, n_labels) with binary labels.
  
      pred_probs:
          A 2D array of shape (n_samples, n_labels) with predicted probabilities.
  
      base_scorer_kwargs:
          Keyword arguments to pass to the base scoring-function.
  
      Returns
      -------
      class_label_quality_scores:
          A 2D array of shape (n_samples, n_labels) with the quality scores for each label.
  
      Examples
      --------
      >>> from cleanlab.internal.multilabel_scorer import MultilabelScorer
      >>> import numpy as np
      >>> labels = np.array([[0, 1, 0], [1, 0, 1]])
      >>> pred_probs = np.array([[0.1, 0.9, 0.7], [0.4, 0.1, 0.6]])
      >>> scorer = MultilabelScorer() # Use the default base scorer (SELF_CONFIDENCE)
      >>> class_label_quality_scores = scorer.get_label_quality_scores_per_class(labels, pred_probs)
      >>> class_label_quality_scores
      array([[0.9, 0.9, 0.3],
             [0.4, 0.9, 0.6]])
      """
      class_label_quality_scores = np.zeros(shape=labels.shape)
      if base_scorer_kwargs is None:
          base_scorer_kwargs = {}
      for i, (label_i, pred_prob_i) in enumerate(
          zip(labels.T, pred_probs.T)
      ):
          pred_prob_i_two_columns = stack_complement(pred_prob_i)
          class_label_quality_scores[:, i] = self.base_scorer(
              label_i, pred_prob_i_two_columns, **base_scorer_kwargs
          )
      return class_label_quality_scores
  
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 4 for calling the MultilabelScorer obj's underlying member method code with example usage: obj.get_class_label_quality_scores(labels, pred_probs, base_scorer_kwargs) and returns: class_label_quality_scores