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