-
Notifications
You must be signed in to change notification settings - Fork 792
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 DecisionTreeFactor division #1962
Conversation
Hmmm, a signature-based constructor only makes sense to me for conditionals (or distributions). I think this mixes up the semantics |
I see why you did this, when looking at the tests, but there is a reason I left it in the tests: it is because signatures are a conditional thing. I think a better way is to create conditionals in the tests, which are derived from DTF anyway, so you can use them as factors in the tests |
It doesn't really matter to be honest. I thought it was better to have Signature constructor since the |
CI fails now, maybe |
From the diff, it looks like |
On more thinking about this, I believe the mathematical structure should include all keys since we would have functional division I'll update the unit test to showcase this and update the docstring. |
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.
Cool!
Added a unit test that
shows the number of keys is incorrect on division, and subsequently fixed itimproves the understanding of discrete factor division.Also added aSignature
based constructor and updated the tests to use it.