random_choice
random_choice#
- relsad.utils.random_choice(random_instance: numpy.random.Generator, p_true: float)[source]#
Returns random choice based on uniform probability distribution
- Parameters
random_instance (np.random.Generator) – Instance of a random generator
p_true (float) – The probability of true
- Returns
choice – Random choice based on uniform probability distribution
- Return type
bool