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

Use GW reparameterisations by default #129

Merged
merged 7 commits into from
Nov 18, 2021

Conversation

mj-will
Copy link
Owner

@mj-will mj-will commented Nov 17, 2021

Currently GWFlowProposal will not use the included reparameterisations if reparameterisations=None. This means that running the sampler with the correct proposal doesn't guarantee the correct reparameterisations.

This PR adds an option to force FlowProposal or any class that inherits from it to use the default reparameterisations even if reparameterisations=None and adds an attribute that defines the default behaviour.

Changes

  • Add attribute use_default_reparameterisations to FlowProposal this defaults to False and can be overridden by child classes.
  • Add use_default_reparameterisations=None to the inputs of FlowProposal. When set to None the default for the class is used. Setting it to True or False overrides the default behaviour.

@mj-will mj-will added enhancement New feature or request gw Changes to gravitational-wave related code labels Nov 17, 2021
@mj-will mj-will added this to the v0.4.0 milestone Nov 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #129 (e0237dd) into main (81e810b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #129   +/-   ##
=======================================
  Coverage   95.03%   95.04%           
=======================================
  Files          39       39           
  Lines        3628     3635    +7     
=======================================
+ Hits         3448     3455    +7     
  Misses        180      180           
Flag Coverage Δ
unittests 95.04% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nessai/gw/proposal.py 84.37% <100.00%> (+0.50%) ⬆️
nessai/proposal/flowproposal.py 97.51% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81e810b...e0237dd. Read the comment docs.

@mj-will mj-will added the tests Improvements or additions to the test suite label Nov 18, 2021
@mj-will mj-will merged commit 9141aa9 into main Nov 18, 2021
@mj-will mj-will deleted the gw-reparameterisations-by-default branch November 23, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gw Changes to gravitational-wave related code tests Improvements or additions to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants