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