-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature Fast RHat #224
Feature Fast RHat #224
Conversation
…ndard RHat into a "HighMem" macro
… case people want to still use it
Hi @mreh528, thank you for contributing to MaCh3! Please wait for MaCh3 developers to review your PR. If no one answers within a week, please message people from this list: https://github.com/orgs/mach3-software/teams/mach3admin . While waiting, please enjoy this Use this action on your projects. Use jokes on issues instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is your first PR, thank you for contributing to MaCh3!
In order to be compatible with existing test cases, I added a "Thinning" parameter designed to skip every What this means is that instead of the command line argument referring to the number of toys you want to generate, it now refers to how many steps will be skipped between loads from the chain (Default should be 1, as we expect to load the full chain with no skips). I don't see any scripts that are predicated on the original functionality, but if any exist, they need to be updated correspondingly. |
…ted toys at each step, whoops
Here are some example autocorrelation plots comparing between the original calculator and the FFT-based algorithm using the MaCh3 tutorial test chain: The two calculations do differ somewhat substantially, but this needs to be put into context:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this :)
Pull request description
Adds a new fast and low-memory RHat calculating macro. Also adds an FFT-based calculator for the AutoCorrelation function.
Changes or fixes
Added a new
RHat
macro. The memory and speed savings are so significant that the previousRHat
calculating macro has been moved toRHat_HighMem
to make the newRHat
calculator the default. The old macro lives on and isn't fully replaced since it is able to calculate the FoldedRHat
statistic, which the new calculator is incapable of since the main time/memory saver for us is not storing the full chain in memory (which is needed for finding the median in the Folded statistic).The FFT-based AutoCorrelation calculator has been added inside MCMCProcessor as a separate toggle apart from the original calculator. The FFT formulation ends up producing slightly different results from the original algorithm, but shares the same characteristics as the original. The benefits are that the FFT algorithm is faster than even the GPU implementation of the original calculator, but can run on a single-threaded CPU.