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