-
Notifications
You must be signed in to change notification settings - Fork 767
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
Proper Hybrid Elimination #1319
Conversation
Hi @varunagrawal - thanks for keeping me posted in these PRs! I had some questions related to #1318 and this PR. I may be misunderstanding, but when I read this, I was confused about a few things:
Let me know if I am missing something? |
Hey Kevin. Yes we eliminated as per a specific ordering (continuous followed by discrete) so we will always eliminate subsets of X before eliminating any M.
Yes you are correct. I am using P(X | M, Z) to mean the unnormalized property, and the way I am considering it is akin to a Gaussian Mixture Model where M is our indexing variable. The idea is then that given a particular Gaussian index, we get the Gaussian P(X | Z). In fact, that is exactly what my unit test in this PR is doing, generating each Gaussian separately and verifying that elimination gives us the equivalent numbers. If I am misunderstanding your question, please let me know. |
I think what Kevin refers to here is that since our hybrid factors just chooses one of a bunch continuous factors, they do not necessarily have the same normalization constant thus you will have a different scale for the branches, which will make your estimation biased. Please correct me if I am speaking nonsense, @keevindoherty :) |
I agree that each leaf will have a different normalization constant, but that shouldn't make any of the leaves biased. The way to think of this is maintaining N different chains, one corresponding to each leaf. If we perform MLE on each of the chains, we can pick the chain that is best supported by the measurement data. This is a similar idea to particle filtering, where each particle represents a particular discrete mode sequence. |
… as individual factor graphs
@ProfFan @keevindoherty @dellaert I managed to figure out the correct way to perform elimination and set the discrete probabilities such that the probability To do this, I had to create a new method The bad news is that we will have to overload the the |
This reverts commit ffd1802.
Sampling test for Hybrid Posterior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think once #1356 is merged and you merge in develop, taking care of conflicts, we can merge this once CI passes. Don't merge in the "Model Selection" things in yet.
This PR adds a unit test showing that the elimination scheme isn't correct since the probabilities of the continuous variables
P(X | M, Z)
doesn't match the case when we individually construct each particular modality.Basically, I have added a unit test that calls the method
getSpecificProblem
which returns a specific (nonlinear) factor graph corresponding to a specific discrete mode sequence. The idea is that the error of this factor graph should equal the error of the hybrid factor graph for the same discrete value assignment.