Add Poisson Bootstrapping Capabilities - #148
Open
kevScheuer wants to merge 1 commit into
Open
kevScheuer wants to merge 1 commit into
kevScheuer wants to merge 1 commit into
Conversation
Collaborator
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previously, if a user wanted to resample their signal (and background) files, they would need to create an entirely new AmpToolsInterface object for every bootstrap sample. This was very slow due to unnecessary reloading of events and calculations. This PR allows one to maintain the same AmpToolsInterface, events, and user variables by simply re-weighting all samples via Poisson Bootstrapping. In short, the user calls$i$ with weight $w_i$ gets re-weighted as $w_i = w_i * p_i$ where effectively:
AmpToolsInterface::bootstrapand every eventThis technique also bootstrap samples the accepted phasespace MC, providing an estimate of the uncertainties regarding acceptance. Thanks to @mashephe for the suggestion to implement this technique.
Code Changes
Listed below are some descriptions of the file changes that were needed, outside of the functions that directly implement the bootstrap capability.
GPUManagerAmpVecscan call it following a re-weightAmpVecsAmplitudeManagerLikelihoodCalculatorm_normIntpromoted toprotectedvariable soLikelihoodCalculatorMPIcould access it.NormIntInterfaceconst, otherwise a cascade of other functions would have their const protection removedNormIntInterfaceMPIGPU vs CPU+MPI testing
I can confirm that the GPU and CPU(+MPI) fits work, but noticed that the MPI jobs were very very slow compared to the GPU. The fits themselves converged in a matter of seconds in both cases, but in between fits the MPI job was slow.
I do not typically run CPU+MPI jobs, so this may have been due to the resources (10 tasks, 5GB each), but perhaps others who do can test it out.