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