Skip to main content

Module random

Module random 

Source
Expand description

Random number generation utilities

Structs§

SeededRng
Generate deterministic random numbers with a seed

Functions§

bootstrap_sample
Randomly sample rows from a 2D array (with replacement)
random_correlation_matrix
Create a correlation matrix with specified eigenvalue structure
random_normal_array
Generate random array from normal distribution
random_normal_matrix
Generate random 2D array from normal distribution
random_permutation
Generate random permutation of indices
random_uniform_array
Generate random array from uniform distribution
random_uniform_matrix
Generate random 2D array from uniform distribution
shuffle_array
Randomly shuffle an array in place
shuffle_rows
Randomly shuffle rows of a 2D array
train_test_split
Randomly split data into train and test sets