You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has recently come to my attention that low-discrepancy sequences could be used in monte-carlo simulations for faster convergence. The benefit is that you require fewer points before the points truly represent the probability distribution. I quickly thought that this faster convergence should definitively be made use of in this package.
Suggestion: I would love the ability to chose a different samples via some option like set_sampler!(:sobol) (defaulting to set_sampler!(:prng). This would make it so that all current code could be used without modification. It also makes sense to make it a global setting, as I guess users would want to use the same sampler in all cases for a given script.
Alternatively, one could of course set a sampler as one constructs the particles (Particles(100, Uniform(0,2), :prng)), but that does not compose well with the nice unicode plus-minus constructor, which to me feels like incentivising users to not use non-default samplers, as it does not allow the same nice syntax. But if the global setting is a bad idea for some reason, this would be much better than nothing.
Below is some (python) code and a reference that I used personally, which might help to get started:
Oh, that is really nice! My bad then. I guess I just assumed that is this package did this, it would be advertised more and at an earlier place in the documentation/readme. But I can hardly complain when there is a dedicated page explaining both how the samples are drawn, and the benefits ^_^
It has recently come to my attention that low-discrepancy sequences could be used in monte-carlo simulations for faster convergence. The benefit is that you require fewer points before the points truly represent the probability distribution. I quickly thought that this faster convergence should definitively be made use of in this package.
Suggestion: I would love the ability to chose a different samples via some option like
set_sampler!(:sobol)
(defaulting toset_sampler!(:prng)
. This would make it so that all current code could be used without modification. It also makes sense to make it a global setting, as I guess users would want to use the same sampler in all cases for a given script.Alternatively, one could of course set a sampler as one constructs the particles (
Particles(100, Uniform(0,2), :prng)
), but that does not compose well with the nice unicode plus-minus constructor, which to me feels like incentivising users to not use non-default samplers, as it does not allow the same nice syntax. But if the global setting is a bad idea for some reason, this would be much better than nothing.Below is some (python) code and a reference that I used personally, which might help to get started:
The text was updated successfully, but these errors were encountered: