#include <HybridBayesTree.h>
Public Member Functions | |
Standard interface | |
HybridBayesTree ()=default | |
bool | equals (const This &other, double tol=1e-9) const |
GaussianBayesTree | choose (const DiscreteValues &assignment) const |
Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment. More... | |
double | error (const HybridValues &values) const |
HybridValues | optimize () const |
Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and using it to compute the best continuous update delta. More... | |
VectorValues | optimize (const DiscreteValues &assignment) const |
Recursively optimize the BayesTree to produce a vector solution. More... | |
DiscreteValues | mpe () const |
Compute the Most Probable Explanation (MPE) of the discrete variables. More... | |
void | prune (const size_t maxNumberLeaves) |
Prune the underlying Bayes tree. More... | |
![]() | |
bool | equals (const This &other, double tol=1e-9) const |
void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
size_t | size () const |
bool | empty () const |
const Nodes & | nodes () const |
sharedClique | operator[] (Key j) const |
const Roots & | roots () const |
const sharedClique & | clique (Key j) const |
BayesTreeCliqueData | getCliqueData () const |
size_t | numCachedSeparatorMarginals () const |
sharedConditional | marginalFactor (Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const |
sharedFactorGraph | joint (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const |
sharedBayesNet | jointBayesNet (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const |
void | dot (std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
Output to graphviz format, stream version. More... | |
std::string | dot (const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
Output to graphviz format string. More... | |
void | saveGraph (const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
output to file with graphviz format. More... | |
Key | findParentClique (const CONTAINER &parents) const |
void | clear () |
void | deleteCachedShortcuts () |
void | removePath (sharedClique clique, BayesNetType *bn, Cliques *orphans) |
void | removeTop (const KeyVector &keys, BayesNetType *bn, Cliques *orphans) |
Cliques | removeSubtree (const sharedClique &subtree) |
void | insertRoot (const sharedClique &subtree) |
void | addClique (const sharedClique &clique, const sharedClique &parent_clique=sharedClique()) |
void | addFactorsToGraph (FactorGraph< FactorType > *graph) const |
Private Types | |
typedef BayesTree< HybridBayesTreeClique > | Base |
Private Member Functions | |
DiscreteValues | discreteMaxProduct (const DiscreteFactorGraph &dfg) const |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< This > | shared_ptr |
typedef BayesTree< HybridBayesTreeClique > | This |
![]() | |
This & | operator= (const This &other) |
~BayesTree () | |
BayesTree () | |
BayesTree (const This &other) | |
void | getCliqueData (sharedClique clique, BayesTreeCliqueData *stats) const |
void | dot (std::ostream &s, sharedClique clique, const KeyFormatter &keyFormatter, int parentnum=0) const |
void | removeClique (sharedClique clique) |
void | fillNodesIndex (const sharedClique &subtree) |
![]() | |
Nodes | nodes_ |
Roots | roots_ |
A Bayes tree representing a Hybrid density
Definition at line 62 of file HybridBayesTree.h.
|
private |
Definition at line 64 of file HybridBayesTree.h.
typedef std::shared_ptr<This> gtsam::HybridBayesTree::shared_ptr |
Definition at line 68 of file HybridBayesTree.h.
Definition at line 67 of file HybridBayesTree.h.
|
default |
Default constructor, creates an empty Bayes tree
GaussianBayesTree gtsam::HybridBayesTree::choose | ( | const DiscreteValues & | assignment | ) | const |
Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment.
assignment | The discrete value assignment for the discrete keys. |
Definition at line 166 of file HybridBayesTree.cpp.
|
private |
Helper method to compute the max product assignment given a DiscreteFactorGraph
Definition at line 46 of file HybridBayesTree.cpp.
Check equality
Definition at line 41 of file HybridBayesTree.cpp.
double gtsam::HybridBayesTree::error | ( | const HybridValues & | values | ) | const |
Error for all conditionals.
Definition at line 186 of file HybridBayesTree.cpp.
DiscreteValues gtsam::HybridBayesTree::mpe | ( | ) | const |
Compute the Most Probable Explanation (MPE) of the discrete variables.
Definition at line 62 of file HybridBayesTree.cpp.
HybridValues gtsam::HybridBayesTree::optimize | ( | ) | const |
Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and using it to compute the best continuous update delta.
Definition at line 83 of file HybridBayesTree.cpp.
VectorValues gtsam::HybridBayesTree::optimize | ( | const DiscreteValues & | assignment | ) | const |
Recursively optimize the BayesTree to produce a vector solution.
assignment | The discrete values assignment to select the hybrid conditional. |
Definition at line 191 of file HybridBayesTree.cpp.
void gtsam::HybridBayesTree::prune | ( | const size_t | maxNumberLeaves | ) |
Prune the underlying Bayes tree.
maxNumberLeaves | The max number of leaf nodes to keep. |
Helper struct for pruning the hybrid bayes tree.
The discrete decision tree after pruning.
A function used during tree traversal that operates on each node before visiting the node's children.
node | The current node being visited. |
parentData | The data from the parent node. |
Definition at line 204 of file HybridBayesTree.cpp.