-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We could merge the QMCSampler and MC sampler #372
Comments
If we have two routines offering the same functionality for no good reason, then I think it makes sense to remove one of them. And then I think it makes sense to remove the one that introduces an additional dependency. Would it make sense to add a "deprecation" output message to the QMCSampler routine at this release and then remove it at the next release? And update the documentation saying to use MCSampler with the The following will also need to be updated/dropped:
|
The less code in the repository the better. |
Hi all. I'm strongly in favour of this merge too, so feel free to go ahead with it! |
addressed in PR #432 |
The QMCSampler does not work with
DiscreteUniform
inputs, and I see no apparent way of fixing this, see #368. In short, the problem lies with the external subroutine fromSALib
, which generates the Saltelli sampling plan, and with the inverse transform ofDiscreteUniform
in chaospy, which generates non-integer values.The MCSampler has a built-in Saltelli algorithm that does not have these issues.
Further, the only difference between QMC / MCSampler is that the former uses a space-filling design from SALib. But this is also available in ChaosPy: https://chaospy.readthedocs.io/en/master/user_guide/fundamentals/quasi_random_samples.html?highlight=latin. So there is no need for SALib, and we could drop this dependency. We would just need to pass a flag to the
MCSampler
if we want to use this, for instancerule='latin_hypercube'
.Finally, I think I've discussed this before, but the names
MCSampler
andQMCSampler
are misleading. Both generate a Saltelli sampling plan, which is specifically designed for Sobol indices. This is why you getn_mc_samples * (d + 2)
samples (d
is the number of inputs), if you specify that you wantn_mc_samples
samples. TheRandomSampler
we have is a "pure" MC sampler. So we could change the name ofMCSampler
or we should make it clear that it's designed for sensitivity analysis.The text was updated successfully, but these errors were encountered: