class_docstr: A basic label model that computes the majority vote across all rules.
  
  For single-label classification, it will predict the label with the most votes.
  For multi-label classification, it will predict all labels that got at least one vote by the rules.
  
  Args:
      weak_labels: The weak labels object.
class_docstr_tok: ["A","basic","label","model","that","computes","the","majority","vote","across","all","rules",".","For","single-label","classification",",","it","will","predict","the","label","with","the","most","votes",".","For","multi-label","classification",",","it","will","predict","all","labels","that","got","at","least","one","vote","by","the","rules",".","Args",":","weak_labels",":","The","weak","labels","object","."]
docstr: Helper methods that computes the probabilities.
  
  Args:
      wl_matrix: The weak label matrix.
  
  Returns:
      A matrix of "probabilities" with nr or records x nr of labels.
      The label order matches the one from `self.weak_labels.labels`.
docstr_tok: ["Helper","methods","that","computes","the","probabilities",".","Args",":","wl_matrix",":","The","weak","label","matrix",".","Returns",":","A","matrix","of","``","probabilities","''","with","nr","or","records","x","nr","of","labels",".","The","label","order","matches","the","one","from","`","self.weak_labels.labels","`","."]
code: def _compute_multi_label_probs(
      self, wl_matrix: np.ndarray
  ) -> np.ndarray:
      """Helper methods that computes the probabilities.
  
      Args:
          wl_matrix: The weak label matrix.
  
      Returns:
          A matrix of "probabilities" with nr or records x nr of labels.
          The label order matches the one from `self.weak_labels.labels`.
      """
      # turn abstentions (-1) into 0
      counts = np.where(wl_matrix == -1, 0, wl_matrix).sum(axis=1)
      # binary probability, predict all labels with at least one vote
      probabilities = np.where(counts > 0, 1, 0).astype(np.float16)
  
      all_rules_abstained = wl_matrix.sum(axis=1).sum(axis=1) == (
          -1
          * self._weak_labels.cardinality
          * len(self._weak_labels.rules)
      )
      probabilities[all_rules_abstained] = [np.nan] * len(
          self._weak_labels.labels
      )
  
      # more "nuanced probability", not sure if useful though
      # with np.errstate(invalid="ignore"):
      #     probabilities = counts / counts.sum(axis=1).reshape(len(counts), -1)
  
      return probabilities
  
imports: import hashlib
  import logging
  from enum import Enum
  from typing import Dict, List, Tuple, Union
  import numpy
  from argilla import DatasetForTextClassification, TextClassificationRecord
  from argilla.labeling.text_classification.weak_labels import WeakLabels, WeakMultiLabels
  from argilla.utils.dependency import requires_dependencies
label_desc: Use image node_id 6 for calling the MajorityVoter obj's underlying member method code with example usage: obj._compute_multi_label_probs(wl_matrix) and returns: probabilities