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