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

Add Hamiltonian Monte Carlo to Flarestack #1

Open
sgriswol opened this issue May 18, 2022 · 1 comment
Open

Add Hamiltonian Monte Carlo to Flarestack #1

sgriswol opened this issue May 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sgriswol
Copy link
Owner

It appears that most of the code needed to perform a fit on source weights, spectral index and number of source weights is already included in the flarestack.core.minimisation.FitWeightMinimisationHandler class. The minimization is performed in the run_trial method, and is called during execution of submitter.analyse(). Another class that is relevant to this execution is the flarestack.core.multiprocess_wrapper.MultiProcessor class. Two methods of this class in particular are relevant to creation and execution of the minimizer, __init__ where process instances are created and started, and run_trial which ultimately calls run_trial and performs the minimization.

In short, adding something to the effect of the following should put us in the right direction towards adding HMC to Flarestack.

@MinimisationHandler.register_subclass("fit_weights_hmc")
class FitWeightHMCMinimisationHandler(FitWeightMinimisationHandler):
    def run_trial(self, full_dataset):
        ...
        return ...
@sgriswol sgriswol added the enhancement New feature or request label May 18, 2022
@sgriswol
Copy link
Owner Author

A brief procedure for achieving this could be

  1. Put HMC into run_trial function for the new class
  2. Get the example notebooks running with the new minimizer
  3. Run comparison of our minimizer to example minimizer (sanity check)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant