class_docstr: Abstract class that defines a Heuristic.
  
  Args:
      shuffle_prop (float): shuffle proportion.
      reverse (bool): True if the most uncertain sample has the highest value.
      reduction (Union[str, Callable]): Reduction used after computing the score.
class_docstr_tok: ["Abstract","class","that","defines","a","Heuristic",".","Args",":","shuffle_prop","(","float",")",":","shuffle","proportion",".","reverse","(","bool",")",":","True","if","the","most","uncertain","sample","has","the","highest","value",".","reduction","(","Union","[","str",",","Callable","]",")",":","Reduction","used","after","computing","the","score","."]
docstr: Rank the predictions according to their uncertainties.
  
  Args:
      predictions (ndarray): [batch_size, C, ..., Iterations]
  
  Returns:
      Ranked index according to the uncertainty (highest to lowes).
      Scores for all predictions.
docstr_tok: ["Rank","the","predictions","according","to","their","uncertainties",".","Args",":","predictions","(","ndarray",")",":","[","batch_size",",","C",",","...",",","Iterations","]","Returns",":","Ranked","index","according","to","the","uncertainty","(","highest","to","lowes",")",".","Scores","for","all","predictions","."]
code: def get_ranks(self, predictions):
      """
      Rank the predictions according to their uncertainties.
  
      Args:
          predictions (ndarray): [batch_size, C, ..., Iterations]
  
      Returns:
          Ranked index according to the uncertainty (highest to lowes).
          Scores for all predictions.
  
      """
      if isinstance(predictions, types.GeneratorType):
          scores = self.get_uncertainties_generator(predictions)
      else:
          scores = self.get_uncertainties(predictions)
  
      return self.reorder_indices(scores), scores
  
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 6 for calling the AbstractHeuristic obj's underlying member method code with example usage: obj.get_ranks(predictions) and returns: self,  scores