Skip to content

Conversation

@AaronDJohnson
Copy link
Collaborator

@AaronDJohnson AaronDJohnson commented Apr 21, 2025

This PR adds reweighting with support for batching over likelihood evaluations. It also adds logl to 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.logL for 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.

@AaronDJohnson
Copy link
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....

@AaronDJohnson AaronDJohnson changed the title Add reweighting to Discovery feat: Add reweighting to Discovery May 18, 2025
@AaronDJohnson
Copy link
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.

@AaronDJohnson
Copy link
Collaborator Author

There is still some bug in this right now. I'll work on it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants