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