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

Suggestions for VEGAS algorithm changes #143

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

Suggestions for VEGAS algorithm changes #143

FHof opened this issue Apr 30, 2022 · 0 comments
Labels
enhancement New feature or request optimization

Comments

@FHof
Copy link
Collaborator

FHof commented Apr 30, 2022

Feature

Desired Behavior / Functionality

It could be possible to change torchquad's VEGAS algorithm so that it converges a bit faster with common integrands.

  • A method could be added to to VEGASMap which splits each interval in the middle. When executed this would double the number of intervals while the mapping stays the same (until the next map update). With this it could be possible to warm up the VEGASMap first with a small number of intervals and points per iteration, then split the intervals and continue the warm-up with more points.
  • Currently every fifth iteration VEGAS may abort, or reset the collected results and increase the number of samples per iteration.
    This behaviour is from the VEGAS implementation on which torchquad's VEGAS is based on. The chi2 / 5.0 < 1.0 condition may be incorrect since according to the G. P. Lepage paper and tutorial, chi2 should be in the order of the number of iterations minus one, which corresponds to chi2 / 4.0 < 1.0.
  • If the VEGAS quadrature is executed sequentially many times with an integrand whose parameters change only slightly over time, it may sometimes be beneficial to re-use a previous VEGASMap and VEGASStratification. This situation may occur when VEGAS is used in a function which is optimised with stochastic gradient descent.

What Needs to Be Done

  • Implement the VEGASMap interval splitting in vegas_map.py and use it for the warm-up in vegas.py
  • Investigate if the condition on chi2 in vegas.py works well or should be changed
  • Change VEGAS so that it is possible to continue the integration with a new integrand but the same VEGASMap and VEGASStratification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization
Projects
None yet
Development

No branches or pull requests

2 participants