-
Notifications
You must be signed in to change notification settings - Fork 765
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
Hybrid Bayes Net/Tree Optimize #1280
Conversation
Optimal discrete assignment needs to be solved by using MPE, CC @xsj01 |
auto reversed = boost::adaptors::reverse(gbn); | ||
gbn = GaussianBayesNet(reversed.begin(), reversed.end()); | ||
#endif | ||
|
||
// Return the optimized bayes net. | ||
return gbn.optimize(); |
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.
Does this mean that gbn.optimize
does not work when the bayes net has non sequential order?
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.
The GBN needs to be topologically sorted so that it optimizes parents before children, and for some reason, the GBN is reverse topologically sorted only when TBB is enabled.
gbn.push_back(gm(assignment)); | ||
|
||
} catch (std::exception &exc) { | ||
// if factor at `idx` is discrete-only, just continue. |
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.
assert that idx is indeed discrete only
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.
Made the assertion in #1282
This PR adds
optimize
methods for the Hybrid Bayes Net and the Hybrid Bayes Tree.The idea is that if we know the optimal discrete assignment, we can pick out the Gaussian Bayes Net and just optimize that.