jonathf / chaospy

Chaospy - Toolbox for performing uncertainty quantification.
https://chaospy.readthedocs.io/
MIT License
437 stars 87 forks source link

sampling for several times or one-shot at one time #407

Open AmosJoseph opened 1 year ago

AmosJoseph commented 1 year ago

Pardon, sorry to bother! But I write to ask what is the difference between the two usage below:

  1. first get 300 samples, then get other 300 samples
    samples =distribution.sample(size =300, rule="L") samples =distribution.sample(size =300, rule="L")

  2. get the whole 600 samples at one time samples =distribution.sample(size =600, rule="L")

Which one is more accrate and can better sample the input region/domain?

Best!

jonathf commented 1 year ago

Latin-hypercube sampling is a method for make the samples more spread out. It is size-dependent, so you should expect to get a stronger effect with 600 than you get for 300+300.

If it is better or not, sounds like an hypothesis worth testing.