Skip to content

Conversation

timonpalm
Copy link
Contributor

Issue #62

I expanded the ODESolver.sample() method to compute likelihoods along the way when sampling, alleviating the two step integration.

You just have to pass the log_p0 parameter to the function.

@meta-cla meta-cla bot added the cla signed label Aug 8, 2025
Copy link
Contributor

@mhavasi mhavasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR. Can you also add a test that compares the output of the forward compute_likelihood and the backward compute_likelihood to make sure they match?

@timonpalm timonpalm force-pushed the sample_w_likelihood branch from 1172ef7 to 0e04528 Compare August 20, 2025 15:56
torch.allclose(forward_log_likelihood, backward_log_likelihood, atol=1e-2),
)

def test_forward_backward_likelihoods(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR. Can you also add a test that compares the output of the forward compute_likelihood and the backward compute_likelihood to make sure they match?

Is this sufficient? It computes the forward likelihood, while generating samples. Then using those samples to compute the backward likelihood and compare them.

The odesolver.compute_likelihood does not allow a forward computation, as it also would't make sense without x1 samples?!

Maybe I am misunderstanding sth. here ...

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

Successfully merging this pull request may close these issues.

2 participants