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