21 #include "drwnVarUniverse.h" 23 #include "drwnFactorGraph.h" 24 #include "drwnTableFactorOps.h" 81 std::vector<drwnTableFactor *> _forwardMessages;
82 std::vector<drwnTableFactor *> _backwardMessages;
83 std::vector<drwnTableFactor *> _oldForwardMessages;
84 std::vector<drwnTableFactor *> _oldBackwardMessages;
87 std::vector<drwnTableFactor *> _intermediateFactors;
88 std::vector<drwnFactorOperation *> _computations;
91 std::vector<drwnTableFactorStorage *> _sharedStorage;
102 virtual void initializeMessages();
103 virtual void buildComputationGraph() = 0;
120 void buildComputationGraph();
137 void buildComputationGraph();
159 std::vector<drwnClique> _separators;
160 std::vector<drwnEdge> _edges;
161 std::vector<std::set<int> > _cliqueEdges;
162 std::vector<std::set<int> > _separatorEdges;
163 double _lastDualObjective;
164 unsigned _maxIterations;
174 void initializeMessages();
175 void buildComputationGraph();
182 void addMessageUpdate(
int cliqueId,
const drwnClique& cliqueVars,
193 static unsigned MAX_CLIQUES_TO_ADD;
197 std::vector<drwnClique> _additionalCliques;
207 void buildComputationGraph();
212 virtual void findCliqueCandidates(std::map<
drwnClique, std::vector<int> >& cliqueCandidateSet);
static unsigned WARMSTART_ITERATIONS
maximum number of iterations after adding clusters
Definition: drwnMapInference.h:192
Implements asynchronous max-product (min-sum) inference.
Definition: drwnMapInference.h:131
Implements iterated conditional modes (ICM) MAP inference. This method was first proposed in Besag...
Definition: drwnMapInference.h:61
static unsigned MAX_ITERATIONS
maximum number of iterations
Definition: drwnMapInference.h:76
Container and utility functions for factor graphs.
Definition: drwnFactorGraph.h:40
Factor which stores the value of each assignment explicitly in table form.
Definition: drwnTableFactor.h:144
std::set< int > drwnClique
variable clique
Definition: drwnGraphUtils.h:37
Implements generic message-passing algorithms on factor graphs. See derived classes for specific algo...
Definition: drwnMapInference.h:73
Implements max-product inference.
Definition: drwnMapInference.h:114
std::vector< int > drwnFullAssignment
defines a complete assignment to all variables in the universe
Definition: drwnVarAssignment.h:36
Implements the generalized LP-based message passing algorithm of Globerson and Jaakkola, NIPS 2007.
Definition: drwnMapInference.h:157
const drwnFactorGraph & _graph
reference to initial clique potentials
Definition: drwnMapInference.h:40
Implements the incremental tightening of the LP MAP inference algorithm from Sontag et al...
Definition: drwnMapInference.h:190
virtual void clear()
Clear internally cached data (e.g., computation graph)
Definition: drwnMapInference.h:48
static double INITIAL_ALPHA
initial gradient step size
Definition: drwnMapInference.h:222
static bool USE_MIN_MARGINALS
use min-marginals for subgradients
Definition: drwnMapInference.h:223
Interface for various MAP inference (energy minimization) algorithms.
Definition: drwnMapInference.h:38
Data structures and utilities for encoding assignments to variables.
Implements the junction tree algorithm for exact inference on a factor graph using drwnAsyncMaxProdIn...
Definition: drwnMapInference.h:145
Implements dual decomposition MAP inference (see Komodakis and Paragios, CVPR 2009 and works cited th...
Definition: drwnMapInference.h:220
static double DAMPING_FACTOR
damping factor for updating messages
Definition: drwnMapInference.h:77
virtual std::pair< double, double > inference(drwnFullAssignment &mapAssignment)=0
Run inference (or resume for iterative algorithms). Algorithms may initialize from mapAssignment if n...