Skip to content
Snippets Groups Projects

Added flag to skip constraint normalization during sampling. This avoids...

This MR is a proposed solution to the mattermost discussion regarding intractably long initialization times with BilbyMCMC and BilbyPTMCMC when sampling in EoS model parameters and applying the standard EoS constraints to the standard parameter priors.

The long initialization times are a result of the method by which the constraint normalization factor is computed: samples are drawn from the prior after which constraints are applied. This process is repeated many times at which point the ratio of samples that passed the constraint requirements to the total number of samples are drawn is computed and used as the constraint normalization factor. The issue with this approach for EoS sampling is that EoS constraints require numerical integration and have an exceptionally low acceptance rate for samples drawn from the prior. As a result, the initialization process takes on the order of days and currently cannot be checkpointed. During sampling this is an unnecessary computation as the normalization factor, which appears in the numerator and denominator of Bayes' theorem, cancels in the MH ratio.

Therefore, this MR implements a flag that can be activated to disable computation of the constraint normalization factor, reenabling EoS parameter estimation when using the BilbyMCMC and BilbyPTMCMC samplers.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Colm Talbot
  • Colm Talbot
  • Thanks @matthew.carney this could be very useful. I added some suggested name changes that I think will improve clarity, although I'm happy to be overruled by a third opinion.

    One thing I left out in my suggestion is that this is only relevant for priors with constraints, but I think that level of detail is best left to docstrings.

  • Colm Talbot changed milestone to %2.4.x

    changed milestone to %2.4.x

  • Matthew Carney added 10 commits

    added 10 commits

    • 9835c460...712c7667 - 8 commits from branch lscsoft:master
    • 06472562 - Added flag to skip constraint normalization during sampling. This avoids...
    • 1bdb8fd4 - Changed constraint normalization flag name to 'normalized' and inverted logic,...

    Compare with previous version

    • Resolved by Leslie Wade

      Sorry for the delay @colm.talbot. I've rebased the branch to master and made the requested changes including:

      • Adding docstrings for added parameters
      • Changing the parameter name to 'normalized' and logically inverted the code to match it's expected behavior.

      Let me know if you have any more suggestions.

  • Matthew Carney added 14 commits

    added 14 commits

    • 1bdb8fd4...8da18af0 - 12 commits from branch lscsoft:master
    • 02c28974 - Added flag to skip constraint normalization during sampling. This avoids...
    • 88cbdd5c - Changed constraint normalization flag name to 'normalized' and inverted logic,...

    Compare with previous version

  • Matthew Carney added 14 commits

    added 14 commits

    • 88cbdd5c...2b93355c - 12 commits from branch lscsoft:master
    • 359dc9b1 - Added flag to skip constraint normalization during sampling. This avoids...
    • 567bf30d - Changed constraint normalization flag name to 'normalized' and inverted logic,...

    Compare with previous version

  • Colm Talbot resolved all threads

    resolved all threads

  • added 1 commit

    • 59a420f9 - MAINT: rename `normalized` to `normalize_prior` in bilby_mcmc

    Compare with previous version

  • Colm Talbot approved this merge request

    approved this merge request

  • Michael Williams resolved all threads

    resolved all threads

  • Aditya Vijaykumar approved this merge request

    approved this merge request

  • mentioned in issue #740 (closed)

  • Colm Talbot added 7 commits

    added 7 commits

    • 59a420f9...74cebee2 - 4 commits from branch lscsoft:master
    • 7b362446 - Added flag to skip constraint normalization during sampling. This avoids...
    • ef60a626 - Changed constraint normalization flag name to 'normalized' and inverted logic,...
    • 997f4fe5 - MAINT: rename `normalized` to `normalize_prior` in bilby_mcmc

    Compare with previous version

  • Colm Talbot added 12 commits

    added 12 commits

    • 997f4fe5...7d45e5c0 - 9 commits from branch lscsoft:master
    • a1f9b9c3 - Added flag to skip constraint normalization during sampling. This avoids...
    • d5b3dd68 - Changed constraint normalization flag name to 'normalized' and inverted logic,...
    • 1d9da644 - MAINT: rename `normalized` to `normalize_prior` in bilby_mcmc

    Compare with previous version

  • merged

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading