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

Low Discrepancy Sequences for MonteCarlo and VEGAS #140

Open
FHof opened this issue Apr 13, 2022 · 0 comments
Open

Low Discrepancy Sequences for MonteCarlo and VEGAS #140

FHof opened this issue Apr 13, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@FHof
Copy link
Collaborator

FHof commented Apr 13, 2022

Feature

Desired Behavior / Functionality

Low discrepancy sequences could be used as an optional replacement for random number generation for MonteCarlo and VEGAS.
With certain integrands, this could lead to a higher average accuracy.

What Needs to Be Done

  • Add a class similar to the RNG class to generate numbers with a low discrepancy sequence instead of a PRNG. An instance of it can be passed as rng argument to VEGAS and MonteCarlo.
    This class could use, for example, PyTorch's and TensorFlow's sobol sequences: https://www.tensorflow.org/api_docs/python/tf/math/sobol_sample, https://pytorch.org/docs/stable/generated/torch.quasirandom.SobolEngine.html
  • Add a function to the number generator classes which samples points and use it for MonteCarlo and VEGAS instead of uniform. In comparison to uniform, the output of this function always corresponds to points in a space, where conceptually a distance function is defined.
  • Change MonteCarlo.get_jit_compiled_integrate so that it works with the number generator class for low discrepancy sequences.

How Can It Be Tested

It can be tested with additional tests in the torchquad/tests folder.

@gomezzz gomezzz added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants