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