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