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