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