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