Skip to content

Conversation

@dellaert
Copy link
Member

@dellaert dellaert commented Jan 3, 2022

Added an optional argument "names" to discrete markdown renderers.

An example from testDiscreteConditional.cpp:

  DecisionTreeFactor::Names names{
      {0, {"Zero", "One", "Two"}}, {1, {"-", "+"}}, {2, {"T", "F"}}};
  cout << conditional.markdown(formatter, names);

P(A|B,C):

B C T F
- Zero 0 1
- One 0.25 0.75
- Two 0.5 0.5
+ Zero 0.75 0.25
+ One 0 1
+ Two 1 0

update: I snuck in a fix for sampling in discrete as well, hope that's ok.

@dellaert dellaert requested a review from gchenfc January 3, 2022 02:38
@dellaert dellaert changed the base branch from develop to feature/decison_tree January 3, 2022 02:39
@dellaert dellaert self-assigned this Jan 3, 2022
Copy link
Contributor

@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.

Stray cout print in a test

Copy link
Contributor

@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 modulo 2 comments.

Base automatically changed from feature/decison_tree to develop January 3, 2022 22:58
@dellaert dellaert merged commit 53b4053 into develop Jan 4, 2022
@dellaert dellaert deleted the feature/markdown_values branch January 4, 2022 00:11
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.

3 participants