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