vector_distribution#
Defines Vector Distribution.
- class VectorDistribution(values: list[Union[float, int]])#
Bases:
objectAn object which samples values from a list of numbers.
- values#
A list containing values.
- Raises:
IndexError – If values is empty.
TypeError – If values contains a value which is not a float or int.
Inits VectorDistribution with the provided arguments.
- Parameters:
values – A list containing all the valid values.
- get_random_values(n: int) list[float]#
Samples an array of values from the list of values with the given shape.
- Parameters:
n – The number of values.
- Returns:
np.ndarray[float]
- get_samples_from_hypercube(n: int) list[float]#
Samples n values from a hypercube.
- Parameters:
n – the number of samples.
- Returns:
Samples of the distributions, sampled from a hypercube.