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 #40

Closed
FHof opened this issue Feb 24, 2022 · 1 comment
Closed

Suggestions for VEGAS algorithm changes #40

FHof opened this issue Feb 24, 2022 · 1 comment

Comments

@FHof
Copy link
Owner

FHof commented Feb 24, 2022

Feature

Desired Behavior / Functionality

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

  • I think 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 splitting in vegas_map.py and use it for the warmup 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
@FHof
Copy link
Owner Author

FHof commented Apr 30, 2022

Moved to esa#143

@FHof FHof closed this as completed Apr 30, 2022
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

1 participant