Add function to convert to a LI prior
Merge request reports
Activity
I understand what you were saying about the fraction of samples now. The issue is about sampling with/without replacement.
I would suggest that we do
posterior.sample(frac=fraction, weights=weights, replace=True)
and also compute the effective sample size,effective_sample_size = sum(weights)**2 / sum(weights**2)
.We could add a warning if
fraction > effective_sample_size / len(posterior)
.I guess there are multiple things going on here, but when using
dynesty
we already resample with replacement, so this would just be another instance of that. At the least, I would suggest thatreplace
should be an argument of this function.@colm.talbot I've added your suggestions
added 7 commits
-
5bd5eadc...3d257816 - 4 commits from branch
master
- 738cfecd - Fix bug and start work on a test
- c745dcca - Merge branch 'master' of git.ligo.org:Monash/tupak into add-prior-conversion
- d85e2e6f - Merge branch 'add-prior-conversion' of git.ligo.org:Monash/tupak into add-prior-conversion
Toggle commit list-
5bd5eadc...3d257816 - 4 commits from branch
mentioned in merge request bilby_pipe!226 (merged)
added Feature-request Priors labels
changed milestone to %0.6.0
mentioned in commit 852ab635