iblrig.misc.get_biased_probs

iblrig.misc.get_biased_probs(n, idx=-1, p_idx=0.5)[source]

Calculate biased probabilities for all elements of an array such that the i`th value has probability `p_i for being drawn relative to the remaining values.

See: https://github.com/int-brain-lab/iblrig/issues/74

Parameters:
  • n (int) – The length of the array, i.e., the number of probabilities to generate.

  • idx (int, optional) – The index of the value that has the biased probability. Defaults to -1.

  • p_idx (float, optional) – The probability of the idx-th value relative to the rest. Defaults to 0.5.

Returns:

List of biased probabilities.

Return type:

List[float]

Raises:
Parameters: