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