Crate cubecl_random

Crate cubecl_random 

Source

Modules§

to_unit_interval_closed_open
to_unit_interval_open

Structs§

BinStats

Functions§

assert_at_least_one_value_per_bin
Asserts that there is at least one value per bin
assert_mean_approx_equal
Asserts that the mean of a dataset is approximately equal to an expected value, within 2.5 standard deviations. There is a very small chance this raises a false negative.
assert_normal_respects_68_95_99_rule
Asserts that the distribution follows the 68-95-99 rule of normal distributions, following the given mean and standard deviation.
assert_number_of_1_proportional_to_prob
For a bernoulli distribution: asserts that the proportion of 1s to 0s is approximately equal to the expected probability.
assert_wald_wolfowitz_runs_test
Asserts that the elements of the data, sorted into two bins, are elements of the sequence are mutually independent. There is a very small chance it gives a false negative.
calculate_bin_stats
Sorts the data into bins for ranges of equal sizes
random_bernoulli
Pseudo-random generator with bernoulli distribution
random_normal
Pseudo-random generator with uniform distribution
random_uniform
Pseudo-random generator with uniform distribution
seed
to_unit_interval_closed_open
Converts a u32 into a f32 in the unit interval [0.0, 1.0). Used for generating random floats.
to_unit_interval_open
Converts a u32 into a f32 in the unit interval (0.0, 1.0). Used for generating random floats.