Skip to content
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

Consider using Scipy stats.qmc module for Quasi-Monte Carlo samplers #120

Open
EwoutH opened this issue May 9, 2022 · 3 comments
Open
Milestone

Comments

@EwoutH
Copy link
Collaborator

EwoutH commented May 9, 2022

In SciPy 1.7.0 one of the most massive PRs in SciPy history was merged, scipy/scipy#10844. This PR added the scipy.stats.qmc submodule, which provides Quasi-Monte Carlo generators and associated helper functions. The qmc submodule is still developed and optimized.

It might be worth investigating if porting some of the EMAworkbench samplers (either the built-in samplers from samplers.py or the imported ones in salib_samplers.py). Sobol, Halton and LatinHypercube are likely candidates.

@quaquel
Copy link
Owner

quaquel commented May 9, 2022

check the TODO under sampling, its on the list.

One issue is that I am hesitant to change any sampler that is related to SALIB because its analysis functions are tied to its sampling functions.

@EwoutH
Copy link
Collaborator Author

EwoutH commented Jun 15, 2022

On a bit broader note, scikit-optimize also has functions for Hammersly sampling and different optimized Latin hypercube sampling methods, such as centered LHS, Maximin optimized LHS and Correlation optimized LHS, which could be interesting to support.

PySMO, as part of the idaes-pse package, might also be interesting to look at

@quaquel
Copy link
Owner

quaquel commented Jun 16, 2022

I hope to overhaul the sampling sometime in the not-so-distant future. I want to give the user more control over how factors (i.e., uncertainties and levers) are sampled and how samples of subsets of factors are combined. Currently, uncertainties and levers are sampled separately and next combined in a factorial manner. However, for example, when doing a Sobol analysis, you might want to sample the uncertainties and levers jointly. You now have to do this in a bit of a hacky sort of way. See lake_model_sample_jointly.py for an example.

As part of this overhaul and associated modifications or additions to the API, it would be good to check the broader landscape of experimental design and sampling in Python.

@quaquel quaquel added this to the 2.4.0 milestone Nov 7, 2022
@quaquel quaquel modified the milestones: 2.4.0, 2.5.0 Apr 19, 2023
@EwoutH EwoutH modified the milestones: 2.5.0, 3.0 Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants