beta_distribution#

Defines Beta Distribution.

class BetaDistribution(alpha: Union[float, int], beta: Union[float, int])#

Bases: object

An object which samples values from a beta distributions.

alpha#

Alpha parameter of the distributions.

beta#

Beta parameter of the distributions.

Raises:
  • TypeError – If alpha is not float or int.

  • TypeError – If beta is not float or int.

  • ValueError – If alpha <= 0.

  • ValueError – If beta <= 0.

Inits BetaDistribution with the provided arguments.

Parameters:
  • alpha – Alpha parameter of the distributions.

  • beta – Beta parameter of the distributions.

get_random_values(n: int) list[float]#

Samples an array of values with the given shape from the distributions.

Parameters:

n – The number of values.

Returns:

an array of randomly sampled values.

get_samples_from_hypercube(n: int) list[float]#

Samples n values from a hypercube.

Parameters:

n – the number of samples.

Returns:

Samples of the distribution, sampled from a hypercube.