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