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