dimanche 23 mai 2021

the way of efficiently generating two random samples with dependency

I would like to generate two set of variables, h_min and h_max,

h_max = [h_max_1, h_max_2, …h_max_2000]
h_min = [h_min_1, h_min_2,… h_min_2000]

Each element of h_max is generated based on uniform distribution, i.e.,

h_max = np.random.uniform(0,  20, 2000). 

For each element, h_min_i, it should be generated based on the uniform distribution with range of 0, and corresponding h_max_i In other words, h_min_i = np.random.uniform(0, h_max_i) In stead of using iteration, how to efficiently generate h_min




Aucun commentaire:

Enregistrer un commentaire