Skip to content
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

Fix Dead Mode Removal #1999

Merged
merged 10 commits into from
Jan 25, 2025
Merged

Fix Dead Mode Removal #1999

merged 10 commits into from
Jan 25, 2025

Conversation

varunagrawal
Copy link
Collaborator

Currently, I am encountering an issue where if we remove a dead mode and then we add a factor which has the mode key in it, the elimination algorithm errors out in the construction of the elimination tree. This is particularly true if we add a discrete chain, where we have conditionals like $P(m_{k+1} | m_k)$ and $m_k$ was the dead mode removed.

The simplest fix is to add the mode marginals to the HybridBayesNet when we remove the mode from the joint so that any future factors that get added referencing those modes don't complain during elimination.

I also added a check for the joint discrete conditional being empty (aka no keys) and we no longer add it. A new unit test was added to confirm this works, but failed before.

@varunagrawal varunagrawal requested a review from dellaert January 25, 2025 01:03
@varunagrawal varunagrawal self-assigned this Jan 25, 2025
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Just one comment

@varunagrawal varunagrawal merged commit 5a3005d into hybrid-smoother Jan 25, 2025
35 checks passed
@varunagrawal varunagrawal deleted the fix-deadmoderemoval branch January 25, 2025 05:53
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