feat: Add reweighting to Discovery#90
Open
AaronDJohnson wants to merge 13 commits intonanograv:mainfrom
Open
Conversation
Collaborator
Author
|
This PR isn't ready yet. Everything seems to be working, but I'm getting a difference of ~200 in the loglikelihood between NUTS samples and samples evaluated in batch with the same likelihood. I generally expect this to give a difference centered around, or at least consistent with 0.... |
Collaborator
Author
|
This is working now. I was missing the Jacobian determinant term and also the Jacobian was missing a factor of 2. Both of these things have been fixed and the functions have been updated to be more descriptive. |
Collaborator
Author
|
There is still some bug in this right now. I'll work on it soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds reweighting with support for batching over likelihood evaluations. It also adds
loglto the output of numpyro models for use in this procedure.The functions take in a Pandas DataFrame for a chain of model 1 and a
XLikelihood.logLfor model 2. The model 2 likelihood evaluates the likelihood on samples from model 1 and then weights, Bayes factors, and uncertainties can be computed from this.