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