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

API improvements for discrete #990

Merged
merged 20 commits into from
Dec 29, 2021
Merged

API improvements for discrete #990

merged 20 commits into from
Dec 29, 2021

Conversation

dellaert
Copy link
Member

@dellaert dellaert commented Dec 27, 2021

In this PR I made a number of improvements in the API, mainly to make it easy for undergrads in python:

  • a new class DiscretePrior
  • new constructors in DecisionTreeFactor and DiscreteConditional
  • a new DiscreteConditional::likelihood method
  • chooseAsFactor is now just choose, ADT version is internal

update:

  • a new method DecisionTreeFactor::enumerate
  • a single-value DiscreteConditional::sample
  • Bumped version to 4.2a0, will release as pre-release after merge

Copy link
Collaborator

@ProfFan ProfFan left a comment

Choose a reason for hiding this comment

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

Need some clarifications before merge.

gtsam/discrete/DecisionTreeFactor.cpp Show resolved Hide resolved
gtsam/discrete/DiscreteConditional.cpp Outdated Show resolved Hide resolved
gtsam/discrete/DiscreteConditional.cpp Outdated Show resolved Hide resolved
gtsam/discrete/discrete.i Show resolved Hide resolved
python/gtsam/tests/test_DiscreteBayesNet.py Outdated Show resolved Hide resolved
@dellaert dellaert merged commit e5b928c into develop Dec 29, 2021
@dellaert dellaert deleted the feature/api_improvements branch December 29, 2021 00:13
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