-
Notifications
You must be signed in to change notification settings - Fork 797
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
Search for K-best solutions #2005
Conversation
@varunagrawal review this version? Substantial refactor coming in next PR |
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.
Some docstring improvements to be had, but pretty straightforward.
} | ||
}; | ||
|
||
// Define the Solutions class |
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.
Maybe more information on why and where this is used so one doesn't have to go hunting through the source code?
OK, I will address all these comments in #2006 |
A new class that uses branch-and-bound search to find the K-best solutions quickly. Should be much more efficient than forming the product and enumerating all assignments. Works for both DiscreteBayesNets and DiscreteBayesTrees.
Testing:
Number of expansions: 35 << Asia Bayes net
Number of expansions: 33 << Asia Bayes tree
There were no test failures
real 0m0.027s
user 0m0.006s
sys 0m0.010s