Rewrote implementation of response propagation in MR
[libdai.git] / ChangeLog
1 git HEAD
2 --------
3
4 * Rewrote implementation of response propagation in MR
5 * Fixed bug in BBPCostFunction::operator=() which prevented the desired
6 assignment from happening
7 * [Stefano Pellegrini] Fixed bug in BP[logdomain=1,inference=MAXPROD]
8 * Removed deprecated functionality
9 * Updated ChangeLog for libDAI-0.2.4 (forgot a few entries)
10
11
12 libDAI-0.2.4 (2010-02-11)
13 -------------------------
14
15 New features:
16 * Implemented Tree-Reweighted BP
17 * [Frederik Eaton] Implemented Fractional Belief Propagation
18
19 Miscellaneous improvements:
20 * Improved documentation
21 * [Frederik Eaton] Added constructors for BBPCostFunction
22 * [Frederik Eaton] Added accessor/mutator for the elements of a SmallSet<>
23 * [Frederik Eaton] Added unary minus to TProb<>
24 * [Frederik Eaton] Added Hellinger distance to TProb<>::DistType
25 * [Frederik Eaton] Two small patches for src/jtree.cpp and utils/createfg.cpp
26 * tests/testdai option "marginals" now has three possible values: NONE
27 outputs no marginals, VAR only variable marginals, and ALL outputs all
28 marginals calculated by the algorithm.
29 * Strengthened convergence criteria of various algorithms
30 * Added GraphAL, an adjacency list implementation for graphs,
31 similar to (but simpler than) BipartiteGraph
32 * Added some functionality to create various standard factors
33 (the functions whose names start with "createFactor")
34 * Added examples example_sprinkler_gibbs and example_sprinkler_em
35 * Implemented various heuristics for choosing a variable elimination sequence
36 in JTree
37 * Added BETHE method for GBP/HAK cluster choice
38 * Made alias support official part of the library
39
40 Build system:
41 * Moved platform independent build options into Makefile.ALL
42 * Windows platform now needs Boost 1.37 or higher
43
44 Code cleanup:
45 * Cleaned up utils/createfg and tests/testdai
46 * Cleanup of some duplicate code in BP, FBP, TRWBP
47
48 Interface changes (the old interface is marked obsolete and will be removed in the next release):
49 * Removed obsolete/deprecated stuff
50 * Renamed Graph into GraphEL (for Graph, implemented as Edge List)
51 * Renamed some functions of BipartiteGraph:
52 add1() -> addNode1()
53 erase1() -> eraseNode1()
54 nr1() -> nrNodes1()
55 add2() -> addNode2()
56 erase2() -> eraseNode2()
57 nr2() -> nrNodes2()
58 * Renamed some functions in ClusterGraph:
59 ClusterGraph::eliminationCost() -> ::eliminationCost_MinFill()
60 ClusterGraph::VarElim() -> ClusterGraph::VarElim( sequentialVariableElimination( ElimSeq ) )
61 ClusterGraph::VarElim_MinFill() -> ClusterGraph::VarElim( greedyVariableElimination( eliminationCost_MinFill ) )
62 * Changed interface of one RegionGraph constructor
63 * Renamed "Clamped BP" into "Conditioned BP"
64
65 Bug fixes:
66 * Fixed regression in scripts/regenerate-properties (now all errors are
67 gathered before throwing the exception, as used to be the case)
68 * Fixed FTBFS errors on MACOSX (thanks to Sebastian Riedel for reporting this bug)
69 * [Alexander Schwing] Fixed error in BP that occured with damping
70 and using log-domain updates
71 * Fixed bug in HAK for trivial region graphs (with only one outer region
72 and no inner regions), reported by Alejandro Lage.
73 * Fixed long-standing bug in TreeEP (now, within-loop propagation optimization works)
74
75
76 libDAI-0.2.3 (2009-11-16)
77 -------------------------
78
79 New features:
80 * Complete doxygen documentation (although more detailed documentation still
81 has to be written)
82 * [Charles Vaske] Added parameter learning for conditional probabilities by
83 Expectation Maximization
84 * [Patrick Pletscher] Added SWIG wrapper code for experimental python and
85 octave interfaces
86 * Added Max-Product functionality to JTree
87 * [Frederik Eaton] Added Back-Belief-Propagation
88 * [Frederik Eaton] Added approximate inference method "Clamped Belief Propagation"
89 * [Frederik Eaton] Added approximate inference method "Gibbs sampling"
90
91 Code cleanup:
92 * Updated copyright headers
93 * Cleaned up error handling by introducing the DAI_THROWE macro
94 * Introduced DAI_DEBASSERT macro to abbreviate a common pattern
95 * Replaced the standard assert() macro by DAI_ASSERT, which throws a
96 dai::Exception and is even active if NDEBUG is defined
97 * Removed all the virtual default constructors *::create(), as they are not used
98 * [Frederik Eaton] Removed unnecessary copy constructors and assignment operators
99 * [Frederik Eaton] Change cout to cerr in warnings and error messages
100
101 Miscellaneous improvements:
102 * BipartiteGraph:
103 - Added eraseEdge( size_t n1, size_t n2 )
104 - [Frederik Eaton] Improved documentation of Neighbor
105 * TProb<T>:
106 - Added divided_by(const TProb<T>&) const
107 - Added constructor TProb<T>( const std::vector<S> &v )
108 - Added size_t draw(), which draws a random index
109 - [Frederik Eaton] Added setUniform()
110 - [Frederik Eaton] Added sumAbs()
111 - [Frederik Eaton] Added argmax()
112 - [Giuseppe Passino] Added begin(), end()
113 * TFactor<T>:
114 - [Giuseppe Passino] Added begin(), end()
115 - [Charles Vaske] Added TFactor( const std::vector<Var> &vars, const std::vector<T> &p ),
116 which reorders variables to canonical ordering before storing the table
117 - Added constructor TFactor<T>( const VarSet &vars, const std::vector<S> &v )
118 - Extended functionality of TFactor<T>::operators +,-,+=,-= to handle different VarSets
119 - Added TFactor<T>::maxMarginal (similar to marginal but with max instead of sum)
120 * State:
121 - [Giuseppe Passino] Added prefix ++ operator
122 * Permute:
123 - [Charles Vaske] Added constructor in Permute for canonical variable ordering
124 * FactorGraph:
125 - [Frederik Eaton] Added clampVar()
126 - [Frederik Eaton] Added clampFactor()
127 - [Giuseppe Passino] Added begin(), end()
128 * PropertySet:
129 - Added keys(), for getting all keys
130 - [Frederik Eaton] Added default constructor
131 - [Frederik Eaton] Added constructor from string
132 * InfAlg:
133 - Added setProperties(), getProperties() and printProperties()
134 - [Frederik Eaton] Added beliefV(), beliefF()
135 * ExactInf:
136 - Added calcMarginal(const VarSet &)
137 * HAK:
138 - Added "init" parameter to allow for random initialization
139 * BP:
140 - [Giuseppe Passino] Added findMaximum(), which can be used after running
141 max-product BP to construct a global state with maximum probability
142 * JTree:
143 - Added findMaximum(), which can be used after running
144 max-product JTree to construct a global state with maximum probability
145 * MatLab interface:
146 - MEX file dai now also returns variable and factor beliefs
147 - [Sebastian Nowozin] MEX file dai now also optionally returns the MAP state
148 (only for BP and JTree)
149 * README is now created automatically from doxygen documentation
150 * [Frederik Eaton] Added script for automatically generating properties code (used by CBP and BBP)
151 * [Frederik Eaton] Added newInfAlgFromString to alldai.h/cpp
152 * [Frederik Eaton] Added some utility macros (DAI_PV, DAI_DMSG, DAI_IFVERB)
153 and functions (concat(),rnd()) to util.h
154 * Changed output stream operator<< for Var and VarSet
155 * [Frederik Eaton] Improved parsing code in tests/testdai to allow recursive
156 alias substitutions
157 * [Frederik Eaton] Added useful aliases to aliases.conf
158 * [Giuseppe Passino] Optimised maximum-residual BP by using a reversed ordered
159 set instead of the linear search (which can yield enormous speedups - a
160 factor 500 has been measured on a binary Ising grid with 128x128 variables!)
161 * Added debug assertions to Var which check for inconsistent dimensions of
162 variables with the same labels
163 * toc() now returns POSIX system time with maximum accuracy of microseconds
164 * Exception objects now remember their error code
165 * Examples:
166 - Moved example.cpp to examples/
167 - Added examples/example_bipgraph.cpp
168 - Added examples/example_varset.cpp
169 - Added examples/example_sprinkler.cpp
170 - Added examples/example_permute.cpp
171 - Added python and octave ports for examples/example_sprinkler.cpp
172
173 Build system:
174 * Improved Makefile:
175 - Merged Makefile.win and Makefile.shared into Makefile
176 - Macros DAI_VERSION and DAI_DATE have been introduced,
177 in order to store this information in a central place
178 - Introduced CCNODEBUGFLAGS in Makefile
179 - Switched Makefile.win to GNU Make syntax
180 - [Frederik Eaton] Added TAGS, lib targets to Makefile
181 * Compatibility:
182 - [Peter Gober] libDAI can now be built on Cygwin
183 - [Dan Preston] libDAI can now be built on Mac OS X
184 - Changed regression test so that it also works under Windows
185
186 Interface changes (the old interface is marked obsolete and will be removed in the next release):
187 * Var:
188 - Variable labels are now nonnegative (of type size_t)
189 * VarSet:
190 - Replaced calcState() by non-member calcLinearState()
191 - Replaced calcStates() by non-member calcState()
192 * Permute:
193 - Renamed convert_linear_index into convertLinearIndex
194 * TProb<>:
195 - Replaced log0() by log(true)
196 - Replaced takeLog0() by takeLog(true)
197 - Removed hasNonPositives()
198 - Renamed minVal() to min()
199 - Renamed maxVal() to max()
200 - Renamed totalSum() to sum()
201 * TFactor<>:
202 - Replaced log0() by TFactor<T>::log(true)
203 - Removed divided_by, use operator/ instead
204 - Removed divide, use operator/= instead
205 - Removed partSum(const VarSet&), use marginal(const VarSet&,false) instead
206 - Renamed minVal() to min()
207 - Renamed maxVal() to max()
208 - Renamed totalSum() to sum()
209 * FactorGraph:
210 - Changed clamp and clamp interfaces (the variable to be
211 clamped is now indicated by its index, not as a Var)
212 * RegionGraph:
213 - Renamed Check_Counting_Numbers into checkCountingNumbers
214 - Renamed Calc_Counting_Numbers into calcCountingNumbers
215 * Miscellaneous:
216 - Renamed Treewidth(const FactorGraph &) into boundTreewidth(const FactorGraph &)
217 - Replaced UEdgeVec by Graph
218 - Replaced DEdgeVec by new RootedTree class
219 - Moved functionality of GrowRootedTree() into constructor of RootedTree
220 - Merged calcPairBeliefsNew() into calcPairBeliefs()
221 - Removed calcMarginal2ndO()
222 - Renamed smallSet<T> to SmallSet<T>
223 - Removed class Diffs
224 - [Frederik Eaton] Added backwards compatibility layer for edge interface to
225 BipartiteGraph and FactorGraph (which will be obsoleted soon)
226
227 Bug fixes:
228 * Fixed reversal of min and max in
229 TFactor<T> min( const TFactor<T> &, const TFactor<T> & )
230 TFactor<T> max( const TFactor<T> &, const TFactor<T> & )
231 * [Sebastian Nowozin] Fixed memory leak in MEX file dai
232 * [Frederik Eaton] In PropertySet::getStringAs(), check for typeid(ValueType)
233 before typeid(std::string) (this fixes a strange bug for empty string property)
234 * Added work-around for bug in Boost Graph Library
235 * Fixed bug in MaxSpanningTree (it wrongly assumed that the tree was not empty).
236 * Fixed bug in calcMarginal and calcPairBeliefs where states with zero probability
237 mass were clamped, leading to NaNs or assertion errors (thanks to Dan Preston
238 for reporting this)
239
240
241 libDAI-0.2.2 (2008-09-30)
242 -------------------------
243
244 New features:
245 * Approximate inference methods now report the number of iterations needed.
246 * Added damping to various algorithms to improve convergence properties.
247 * Added more features to utils/createfg for creating factor graphs.
248 * Added ExactInf class for brute force exact inference.
249 * [Giuseppe Pasino] Added "logdomain" property to BP, a boolean that controls
250 whether calculations are done in the log-domain or in the linear domain;
251 doing calculations in the log-domain may help if the numerical range
252 of a double is too small.
253 * [Claudio Lima] Added Max-Product functionality to BP.
254 * Improved documentation.
255
256 Improved architecture:
257 * Added Exceptions framework.
258 * Pervasive change of BipartiteGraph implementation (based on an idea by
259 Giuseppe Passino). BipartiteGraph no longer stores the node properties
260 (former _V1 and _V2), nor does it store a dense adjacency matrix anymore,
261 nor an edge list. Instead, it stores the graph structure as lists of
262 neighboring nodes. This yields a significant memory/speed improvement for
263 large factor graphs, and is more elegant as well. Iterating over neighbors is
264 made easy by using boost::foreach.
265 * Added conditional compilation of inference methods.
266 * VarSet is now implemented using a std::vector<Var> instead of a
267 std::set<Var>, which yields a significant speed improvement. Furthermore,
268 the implementation has been generalized, resulting in the small_set<T> class
269 which can be used to represent sets of small cardinality; VarSet is the
270 specialization with T = Var.
271 * Improved ClusterGraph implementation, yielding significant speedups
272 for the JunctionTree algorithm on large factorgraphs.
273
274 Code cleanup:
275 * Moved everything into namespace "dai".
276 * Renamed DEBUG to DAI_DEBUG to avoid conflicts.
277 * Replaced ENUM2,ENUM3,ENUM4,ENUM5,ENUM6 by single DAI_ENUM macro.
278 * Removed utils/remove_short_loops and matlab/remove_short_loops.
279 * Replaced sub_nb class in mr.h by boost::dynamic_bitset.
280 * Improved index.h:
281 - Renamed Index -> IndexFor
282 - Added some .reserve()'s to IndexFor methods which yields a
283 25% speedup of testregression
284 - Replaced multind by Permute
285 - Added MultiFor
286 - Added State
287 * New funcstionality of factor.h.
288 * Moved Properties and MaxDiff frameworks from InfAlg to each individual
289 inference algorithm, because the Properties framework was not as
290 convenient as I hoped, and not every inference algorithm needs a maxdiff
291 variable. Also, replaced some FactorGraph functionality in InfAlg by a
292 function that returns the FactorGraph. The result is cleaner (less
293 entangled) code.
294 * Removed x2x.
295 * Replaced Complex with real numbers (negative potentials are just too rare
296 to warrant the additional "complexity" :)).
297
298 Miscellaneous improvements:
299 * Now compiles also with MS Visual C++ (thanks to Jiuxiang Hu) and with
300 GCC under cygwin.
301 * Contributions by Peter Gober:
302 - Renamed variable _N in mr.* for compatibility with g++ under cygwin.
303 * Misc contributions by Giuseppe Passino:
304 - removed "using namespace std;" from header files - bad practice;
305 - moved header files in include/dai and sources in src;
306 - changed #ifndefs to GNU style;
307 - added extra warning checks (-W -Wextra) and fixed resulting warnings;
308 - dai::TProb:
309 o removed copy constructor and assignment operators (redundant);
310 o implementation of some methods via STL algorithms;
311 o added methods takeExp, takeLog, takeLog0 for transformation in-place;
312 o explicit constructor (prevents implicit conversion from size_t to TProb);
313 o added operator+,+=,-,-=, with argument T (for calculations in log-scale);
314 * Misc contributions by Christian Wojek:
315 - New FactorGraph constructor that constructs from given ranges of factors
316 and variables;
317 - Optimization of FactorGraph constructors using tr1::unordered_map.
318 * FactorGraph constructors no longer check for short loops (huge speed
319 increase for large factor graphs), nor for negative entries. Also, the
320 normtype is now Prob::NORMPROB by default.
321 * Improved MaxSpanningTreePrims algorithm (uses boost::graph).
322
323 Interface changes:
324 * VarSet::
325 - VarSet::stateSpace() -> nrStates(const VarSet &)
326 - VarSet( const std::set<Var> ) -> VarSet( begin, end, sizeHint=0 )
327 - VarSet( const std::vector<Var> ) -> VarSet( begin, end, sizeHint=0 )
328 - removed bool operator||
329 - operator&&(const VarSet&) -> intersects(const VarSet&)
330 - operator&&(const Var&) -> contains(const Var&)
331 * FactorGraph::
332 - delta(const Var &) -> delta(size_t)
333 - Delta(const Var &) -> Delta(size_t)
334 - makeCavity(const Var &) -> makeCavity(size_t)
335 - vars() -> vars
336 - factors() -> factors
337 - removed MakeFactorCavity(size_t)
338 - removed ExactMarginal(const VarSet &)
339 - removed ExactlogZ()
340 - removed updatedFactor(size_t)
341 - removed _normtype and NormType()
342 - removed hasShortLoops(...) and removeShortLoops(...)
343 - WriteToDotFile(const char *filename) -> printDot( std::ostream& os )
344 - undoProb(size_t) -> restoreFactor(size_t)
345 - saveProb(size_t) -> backupFactor(size_t)
346 - undoProbs(const VarSet &) -> restoreFactors(const VarSet &)
347 - saveProbs(const VarSet &) -> backupFactors(const VarSet &)
348 - ReadFromFile(const char*) returns void (throws on error)
349 - WriteToFile(const char*) returns void (throws on error)
350 - removed hasNegatives()
351 * RegionGraph::
352 - nr_ORs() -> nrORs()
353 - nr_IRs() -> nrIRs()
354 - ORs() -> ORs
355 - IRs() -> IRs
356 * *::Regenerate() -> *::construct()
357 * Renamed Index -> IndexFor
358 * Diffs:
359 - max() -> maxDiff()
360 - max_size() -> maxSize()
361 * Prob::max() -> Prob::maxVal()
362 * Factor::
363 - max() -> maxVal()
364 - part_sum() -> partSum()
365 * toc() in util.h now returns seconds as a double
366 * VarSet::operator&&
367 * Properties -> PropertySet
368
369
370 libDAI-0.2.1 (2008-05-26)
371 -------------------------
372
373 Bugfix release.
374 * added missing cstdio header in util.h
375 * fixed Properties in MR_CLAMPING_* and MR_EXACT_*
376 * added description of the factor graph fileformat
377 * improved Makefile
378
379
380 libDAI-0.2.0 (2006-11-30)
381 -------------------------
382
383 First public release.
384
385
386 0.1.5 (2006-11-30)
387 ------------------
388
389 Regressions
390
391 - tests/testlcbp and tests/testlcbp are broken.
392 - EXACT method does not work anymore.
393 - The Properties framework gives a speed penalty because of the lookup
394 costs involved; inner loops should be optimized.
395
396 General framework
397
398 - DAIAlg is now a template class; typedefs for DAIAlg<FactorGraph> and for
399 DAIAlg<RegionGraph> are provided. In this way, we do not have to write "wrapper"
400 functions to forward functionality from either FactorGraph or RegionGraph
401 to DAIAlg. Functionality like clamping can be implemented in FactorGraph
402 and in RegionGraph and no explicit interface is needed in descendants.
403 - New abstract base class InfAlg added, representing an inference algorithm,
404 from which DAIAlg<T> inherits. This solves the incompatibility problems of
405 DAIAlg<T> for different T (e.g. DAIAlg<FactorGraph> was incompatible with
406 DAIAlg<RegionGraph>). More work is required to reduce code duplication
407 (make FactorGraph part of InfAlg).
408 - Added generic interface (nrVars(), Vars(), nrFactors(), factor(size_t),
409 beliefs(), belief(VarSet &), ...) to InfAlg and descendants.
410 - Added a saveProbs/undoProbs interface to InfAlg and descendants that enables
411 one to save a few factors, modify them (e.g. clamp them), and then restore them
412 to their old values. Undo should also init the corresponding messages / beliefs.
413 This can be used if a given factor graph repeatedly needs to be clamped in
414 different ways and an approximation method is run for each clamping; using the
415 saveProbs/undoProbs can give a significant speed increase.
416 - Switched to a general Properties framework that handles the parameters of
417 all inference methods in a uniform manner. The Properties class is a map of
418 several properties in boost::any objects, indexed by their names (strings).
419 It can read from a stream and write to a stream. It is recursive, in the sense
420 that a Properties object can hold a variable of type Properties as well.
421 - Added a generic way of constructing inference algorithms from a factor graph,
422 name and properties object. Added the newInfAlg function which constructs
423 the requested object. This is used by LCBP, the Matlab interface and the
424 command line (test) interface.
425 - Added a generic enum framework for enum parameters. Although implemented as a
426 hack, it is quite useful in that it drastically simplifies and reduces the
427 amount of code for handling enum parameters.
428 - Provided generic functions for calculating marginals in different ways that
429 work for all approximate inference methods.
430
431 Bugfixes
432
433 - Fixed GBP free energy.
434 - Fixed bug in junctiontree (it didn't init the _vars variable).
435 - Corrected two bugs in operator&& and operator|| in VarSet (they returned
436 the logical NOT of what they should return).
437 - Fixed bug in RegionGraph::RecomputeOR(s).
438 - Fixed bug in utils/create_dreg_fg:
439 graph structure was not random for given parameters (forgot to call srand()).
440 - TreeEP bug workaround: use the complete junction tree instead of a subtree.
441 - Fixed bug in JTree::HUGIN() and JTree:ShaferShenoy() in case of junction tree
442 that consists of one outer region only.
443 - Fixed INIT bug in LCBP2::UpdatePancake().
444 - Fixed MaxDiffs flow (except for MR).
445
446 New functionality
447
448 - HAK supports several default cluster choices:
449 minimal (only factors)
450 delta (Markov blankets)
451 loop (all loops consisting of loops consisting of <loopdepth> or less variables)
452 Only the maximal clusters are used as outer clusters.
453 - Implemented TreeEP. It generalizes the heuristic method described in the
454 Minka & Qi paper for obtaining a tree with the most relevant interactions to
455 higher order interactions. Almost all optimizations described in the Minka & Qi
456 paper are used, except that evidence is passed over the whole tree instead of
457 relevant subsets (the latter is almost implemented but buggy). Also added
458 alternative (worst-case) algorithm that uses a maximum spanning tree on the
459 weighted graph where the weight between neighbours i and j is given by
460 N(psi,i,j), where psi is the product of all the factors involving both i and j
461 (which is an upper bound on the effective interaction between i and j).
462 - Implemented MR (MontanariRizzo) based on Bastian's code, but extended it
463 to be able to handle connectivities larger than 3 (in principle, up to 32).
464 It supports different initialization methods (the original RESPPROP,
465 the CLAMPING method and EXACT which uses JTree) and different update methods
466 (FULL and LINEAR).
467 - Implemented LCBP2, an analogon of LCBP which represents pancakes as little
468 networks and uses some approximate inference method on them for calculating
469 marginals.
470 - Now there are several LCBP variants (LCBP, LCBPI, LCBPJ, LCBPK, LCBPL);
471 LCBPJ works only for pairwise, LCBPK is LCBP improved for higher order
472 interactions and LCBPL is LCBPI improved for higher-order interactions.
473 - Wrote one single program utils/createfg for creating various types of
474 random factor graphs.
475 - Wrote utility to visualize factor graphs using graphviz.
476 (it uses the BOOST Program Options library)
477 - Added fginfo utility that displays some info about a .fg file.
478 - Implemented Factor::strength function that calculates the potential strength
479 N(psi,i,j) between variables i and j as described in cs.IT:0504030
480 - Wrote a general MatLab interface matlab/dai (similar to tests/test);
481 this unified the matlab functions dai, dai_bp, dai_mf, dai_jt, dai_tep, dai_cvm.
482 - Added MATLAB routine that returns contraction matrix A for BP convergence analysis.
483 - Implemented a MATLAB interface ai_potstrength for Factor::strength
484 - Added Martijn's x2x
485
486 Improvements of existing code
487
488 - Reimplemented RegionGraph and descendants: a RegionGraph ISA FactorGraph
489 and also a BipartiteGraph<FRegion,Region>. It now also keeps a map that
490 associates outer region indices to factor indices (no powers yet, this
491 is deemed superfluous) and provides functions to recompute (some of) the
492 outer regions from the factors.
493 - InfAlg descendants run() methods now stop immediately and return NAN in case
494 they detect NANs. Only BP does not do NAN checking for performance reasons.
495 - LCBP now works with factors containing zeroes (by defining x/0 = 0).
496 - HAK, GBP and DoubleLoop now conform to the standards for verbose reporting,
497 timing and convergence criteria.
498 - Implemented logZ() for JTree. It does the calculation during message-passing.
499 - Marginal2ndO now optionally divides by the single node beliefs (to the power n-2);
500 hopefully this will give more accurate approximations.
501 - Marginal and Marginal2ndO (optionally) use the new saveProbs/undoProbs functionality
502 for a faster way of calculating marginals, which does not require a call to init()
503 nor cloning the whole object for each clamping. This leads to a significant speedup.
504 - LCBP (and LCBP2) now have complete flexibility in the specification of the
505 inner method, i.e. the method used to generate the initial cavity approximations.
506 One can pass two strings, a name and a properties string, and LCBP simply invokes
507 newInfAlg to construct the corresponding inference algorithm and uses the generic
508 marginal functions to approximate cavity marginals.
509 - Replaced the global "method" variable by local properties and removed ai.h
510 - Added some methods to Factor (operators *, *=, /, /= with doubles as
511 second argument, operators -, +=, -= with other Factors as second
512 arguments, randomize(), RemoveFirstOrderInteractions) and similar
513 operations to Prob
514 - Moving towards boost::program_options for handling command line arguments
515 (tests/test is done).
516 - Renamed some FactorGraph methods:
517 nr_vars -> nrVars
518 nr_factors -> nrFactors
519 varind -> findVar
520 factorind -> findFactor
521 makeFacCavity -> makeFactorCavity
522 - LCBP_SEQMAXRES has been removed because it did strange things.
523 - Implemented RandomDRegularGraph
524 - Implemented JTree::calcMarginal for marginals that are not confined
525 within one cluster (using cut-set conditioning).
526 - Added isConnected() method to FactorGraph (some methods do not work with
527 disconnected factor graphs).
528 - Pair beliefs are now calculated in a symmetrical way by calcPairBeliefs
529 - Removed single node interaction "correction" code from clamping methods
530 - Removed calcCavityDist and calcCavityDist2ndO
531 - No longer depends on GSL.
532 - Increased portability by combining platform dependant utility functions
533 in util.{h,cpp}.
534 - Wrote *.m files providing help
535
536 Testing framework
537
538 - Made a new and significantly improved testing framework that provides most
539 functionality from the command line.
540 - The basis is provided by tests/test, which uses the newInfAlg functionality
541 and enables the user to easily compare from the command line different
542 inference methods on a given factorgraph. All parameters can be specified.
543 Output consists of CPU time, average and maximum single variable marginal
544 errors, relative logZ error and MaxDiff().
545 - tests/aliases.conf contains aliases for standard combinations of methods
546 and their options (which can be used in tests/test).
547 - tests/large contains several bash/python scripts that create random factor
548 graphs, compare several approximate inference algorithms (using tests/test) and
549 allow for easy visualization of the results using PyX.
550 - Added several .fg files for test purposes to /tests (e.g. two ALARM versions
551 alarm.fg and alarm_bnt.fg; testfast.fg, a 4x4 periodic Ising grid for
552 regression testing).
553 - Added a regression test to the Makefile which is included in the standard
554 target. It compares all inference methods on tests/testfast.fg with the
555 results stored in tests/testfast.out
556
557 Miscellaneous
558
559 - Expanded all tabs to spaces (":set tabstop 4\n:set expandtab\n:retab" in vim)
560 - Experimental MATLAB code added for StarEP approximation on cavity
561 - Renamed project to libDAI and changed directory name accordingly.
562 - Renamed JunctionTree to JTree.
563 - Fixed licensing (now it's officially GPL).
564 - Improved README
565
566
567 revision 252
568 ------------
569
570 Functionality
571 - Added RegionGraph, GBP, CVM and HAK (double-loop).
572 - Added JunctionTree (with two update algorithms, HUGIN and Shafer-Shenoy), which is a
573 RegionGraph.
574 - NormType is now chosen automatically (in case of negative factors, Prob::NORMLINF is used,
575 otherwise the default Prob::NORMPROB is used). Also, in case of negative factors, the
576 RegionGraph constructors assign each Factor to a unique outer region instead of dividing
577 it over all subsuming outer regions. See README for when negative factors are known to work
578 and when not.
579 - FactorGraph::FactorGraph(const vector<Factor>) only gives a warning in case of short loops,
580 it does not automatically merge factors anymore.
581 - Removed BP_SEQMAXRESNOCLEAR (all cavity initialization methods now are implicitly NOCLEAR)
582 - Added MATLAB interface functions ai_readfg, ai_removeshortloops and ai_bp
583 - Added LCBP-III type that should be equivalent to LCBP-II, but can handle zeroes
584 in potentials. Note that it is significantly slower than LCBP-II (and has to be reimplemented
585 such that it does not store the complete pancakes, but represents them as little factor graphs).
586
587 Implementation / code
588 - Made a seperate type WeightedGraph, which until now only implements Prim's
589 maximal spanning tree algorithm and is only used by the junction tree code. It might
590 be good to make it a class somewhere in the future and extend it's interface.
591 - Made a seperate class ClusterGraph, which is only used by the junction tree
592 code. It's main purpose is a graph-theoretical variable elimination algorithm.
593 - Implemented the heuristic "minimum-new-edges-in-clique-graph" for variable elimination.
594 - Massive code cleanup, moving towards "generic" programming style, using
595 multiple inheritance and polymorphism.
596 o BP, LCBP, MF, HAK and JunctionTree now inherit from a common DAIAlg class
597 o Made generic functions Marginal, Marginal2ndO, calcCavityDist, calcCavityDist2ndO, clamp
598 that can be used by FactorGraph-based DAIAlgs.
599 o Created TProb<T> class, which stores a probability vector (without the accompanying indexing
600 and VarSet) and provides functionality for it (which is used by TFactor<T>).
601 o Rewrote the VarSet class. It now caches its statespace(). It now privately inherits from set<Var>.
602 I had to overload the insert methods of set<Var> so that they calculate the new statespace.
603 o Rewrote the TFactor class. The TFactor class now HAS a TProb and HAS a VarSet.
604 - Rewrote BP to use the new TProb<T> interface. Performance of BP improved up to a factor 6 by:
605 o using Prob's instead of Factor's;
606 o splitting the multiplication of the messages into two parts (thanks to Vicenc!);
607 o optimizing the calculation of the beliefs (only the message calculations were optimized till now).
608 o replacing FactorGraph::_nb1 and _nb2 (which were set<size_t>) by vector<size_t>
609 - LCBP now seperately stores cavitydists and pancakes. Added InitPancakes() method
610 that takes the cavitydists and multiplies them with the relevant factors. This
611 resulted in an API change in AI which now accepts and returns initial cavitydists
612 instead of initial pancakes.
613
614 Minor changes
615 - Started writing DoxyGen documentation
616 - Renamed lcptab2fg.m matlab/ai_writefg.m
617 - Moved all matlab stuff to matlab/
618 - More detailed reporting (also reports clocks used).
619 - Marginal and Marginal2ndO now use *differences* in logZ to avoid NaNs.
620 - Improved testing suite.
621 - Removed logreal support.
622 - FactorGraph now also supports input streams and ignores comment lines in .fg files.
623 - Added tests/create_full_fg.cpp and tests/create_ising_fg.cpp which create
624 full and periodic 2D Ising networks according to some command line parameters.
625 - Now logZ really returns logZ instead of -logZ.
626 - Added FactorGraph::WriteToDotFile
627
628
629 0.1.4 (2006-04-13)
630 ------------------
631 - Added file IO routines to read and write factorgraphs.
632 - Added L-infinity normalization for use with (partially) negative factors.
633 - Renamed BetheF, MFF to logZ, which now use complex numbers to be able to
634 handle (partially) negative factors.
635 - Added test suite.
636 - All probabilities are now represented using double instead of LogReal<double>.
637 - Combined Alg and Alg3 into LCBP. Several update schemes possible.
638 - Combined several variants of BP into doBP. Several update schemes possible.
639 Now uses precalculated indices for optimization.
640 - Renamed Node -> Var and Potential -> Factor.
641 - Extensive code cleanup. More use of OO techniques. Changed API.
642 - MaxIter now means maximum number of passes (corresponding to number of
643 _parallel_ updates).
644 - MaxDiff now means the maximum L-infinity distance between the updated and
645 original single variable beliefs, for all AI methods.
646 - Implemented RBP which converges faster than BP for difficult problems.
647 - Now uses method parameter which is a bitmask combining outmethod and inmethod
648 (see ai.h).
649
650
651 0.1.3 (2006-03-22)
652 --------------------
653 - All AI methods now return maxdiff
654 - ai.cpp:
655 o Now returns maxdiffinner and maxdiffouter
656 o New BP2ndO innermethod (estimate only 2nd order cavity interactions)
657 o New InitCav outermethod (only create initial cavity distributions)
658 - bp.cpp:
659 o New CavityDist2ndO which estimates 2nd order cavity interactions
660 - Makefile:
661 o Bugfix: removed dependencies on algwim.*
662
663
664 0.1.2 (2006-02-28)
665 --------------------
666 - Cleaned up alg.cpp (removed Alg2 and its corresponding data structures).
667 - Added the possibility to provide initial cavity distributions as an input
668 argument to ai (not much error checking is done, so be careful).
669 - Potentials2mx now correctly sets the dimensions of the P field (i.e. for
670 the output arguments Q, Q0 of ai).
671 - Removed algwim.* since it does not work.
672
673
674 0.1.1 (2006-02-28)
675 --------------------
676 - The constructors of (Log)FactorGraph and LogFactorGraph from a
677 vector<(Log)Potential> now merge potentials to prevent short loops (of length
678 4) in the factor graph. These are used in ai to construct the factor graphs
679 from the psi argument. If compiled with DEBUG defined, the method calc_nb()
680 of BipGraph checks for the existence of short loops.
681 - Changed calling syntax of ai (now the actual syntax *does* correspond to its
682 description in the help).
683 - ai does not hook cout anymore (which caused weird segfaults).
684 - Fixed a bug in an assert statement in the matlab interface code in ai.cpp.
685 - Removed network.* since it is not useful.
686
687
688 0.1.0 (2006-02-28)
689 --------------------
690 First version worthy a version number.