class_docstr: Sort by the highest acquisition function value.
  
  Args:
      shuffle_prop (float): Amount of noise to put in the ranking. Helps with selection bias
          (default: 0.0).
      reduction (Union[str, callable]): function that aggregates the results
          (default: 'none`).
  
  References:
      https://arxiv.org/abs/1703.02910
class_docstr_tok: ["Sort","by","the","highest","acquisition","function","value",".","Args",":","shuffle_prop","(","float",")",":","Amount","of","noise","to","put","in","the","ranking",".","Helps","with","selection","bias","(","default",":","0.0",")",".","reduction","(","Union","[","str",",","callable","]",")",":","function","that","aggregates","the","results","(","default",":","'none","`",")",".","References",":","https",":","\/\/arxiv.org\/abs\/1703.02910"]
docstr: Compute the score according to the heuristic.
  
  Args:
      predictions (ndarray): Array of predictions
  
  Returns:
      Array of scores.
docstr_tok: ["Compute","the","score","according","to","the","heuristic",".","Args",":","predictions","(","ndarray",")",":","Array","of","predictions","Returns",":","Array","of","scores","."]
code: def compute_score(self, predictions):
      """
      Compute the score according to the heuristic.
  
      Args:
          predictions (ndarray): Array of predictions
  
      Returns:
          Array of scores.
      """
      assert predictions.ndim >= 3
      # [n_sample, n_class, ..., n_iterations]
  
      expected_entropy = -np.mean(
          np.sum(xlogy(predictions, predictions), axis=1), axis=-1
      )  # [batch size, ...]
      expected_p = np.mean(
          predictions, axis=-1
      )  # [batch_size, n_classes, ...]
      entropy_expected_p = -np.sum(
          xlogy(expected_p, expected_p), axis=1
      )  # [batch size, ...]
      bald_acq = entropy_expected_p - expected_entropy
      return bald_acq
  
imports: import types
  import warnings
  from collections.abc import Sequence
  from functools import wraps
  from typing import List
  import numpy
  import scipy.stats
  import torch
  from scipy.special import xlogy
  from torch import Tensor
  from baal.utils.array_utils import to_prob
label_desc: Use image node_id 2 for calling the BALD obj's underlying member method code with example usage: obj.compute_score(predictions) and returns: bald_acq