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

Better DiscreteConditional #1037

Merged
merged 7 commits into from
Jan 16, 2022
Merged

Better DiscreteConditional #1037

merged 7 commits into from
Jan 16, 2022

Conversation

dellaert
Copy link
Member

This PR has

  • creation of joint densities using operator*. It replaces the very poorly tested and confusing Compose, which was not used anywhere.
  • extensive testing
  • removed toFactor, which is a remnant from when we did not inherit from factors
  • exposes creation of a DiscretePrior from a vector of floats.
  • added a constructor from an ADT
  • some smaller documentation improvements

@dellaert dellaert added the high-priority Need this done quickly label Jan 16, 2022
@dellaert dellaert self-assigned this Jan 16, 2022
@dellaert dellaert added the quick-review Quick and easy PR to review label Jan 16, 2022
Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

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

LGTM sans one comment

pAB = prior * conditional
self.gtsamAssertEquals(prior, pAB.marginal(B[0]))

pA = DiscreteConditional(A % "5/4")
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is happening over here? We have (0, 2) % "5/4", not sure if this should be (0, 2), "5/4".

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, will fix that

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am making fixes since other stuff is also breaking. 🙂

@dellaert
Copy link
Member Author

Thanks! Now I'm behind a CI traffic jam, though, so I'd prefer if you just comment in future? :-)

@varunagrawal
Copy link
Collaborator

It'll be fast enough. Go enjoy a hot cup of coffee in this weather and it will be done before you know it. :)

@dellaert
Copy link
Member Author

It'll be fast enough. Go enjoy a hot cup of coffee in this weather and it will be done before you know it. :)

pretty please. I need to get this release out.

@dellaert dellaert merged commit f3d9486 into develop Jan 16, 2022
@dellaert dellaert deleted the feature/discrete_operators branch January 16, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority Need this done quickly quick-review Quick and easy PR to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants