Reproducing samples using "Latin Hypercube sampling" method

Hello,

Using random function we can generate random values. To generate same random number every time we execute the code, we use random.seed(42)! I mean we use seed function to reproduce the random number.

But, i want to generate the samples using “Latin Hypercube sampling” method. So, in this method, is there any way to generate the same samples everytime we execute the code?

Thanks

The Latin Hypercube sampling method is still random. You would have to use a fixed pseudorandom number generator seed to get the same results every time from a Latin Hypercube sampling.

Hi Jeremy! Thanks for the reply. Could you please say little bit more detail. I mean can you please say how to use “a fixed pseudorandom number generator seed”? Is there any standard function or piece of code, which i can use to do what you mentioned. Thanks!

Random.seed is the way to fix the seed for the pseudorandom number generator.

I used random_state = 1 inside the predefined Latin Hypercube sampling. And it worked very well for me!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.