1 New features:

2 * Complete doxygen documentation (although more detailed documentation still

3 has to be written)

4 * [Charles Vaske] Added parameter learning for conditional probabilities by

5 Expectation Maximization

6 * [Patrick Pletscher] Added SWIG wrapper code for experimental python and

7 octave interfaces

8 * Added Max-Product functionality to JTree

9 * [Frederik Eaton] Added Back-Belief-Propagation

10 * [Frederik Eaton] Added approximate inference method "Clamped Belief Propagation"

11 * [Frederik Eaton] Added approximate inference method "Gibbs sampling"

13 Code cleanup:

14 * Updated copyright headers

15 * Cleaned up error handling by introducing the DAI_THROWE macro

16 * Introduced DAI_DEBASSERT macro to abbreviate a common pattern

17 * Replaced the standard assert() macro by DAI_ASSERT, which throws a

18 dai::Exception and is even active if NDEBUG is defined

19 * Removed all the virtual default constructors *::create(), as they are not used

20 * [Frederik Eaton] Removed unnecessary copy constructors and assignment operators

21 * [Frederik Eaton] Change cout to cerr in warnings and error messages

23 Miscellaneous improvements:

24 * BipartiteGraph:

25 - Added eraseEdge( size_t n1, size_t n2 )

26 - [Frederik Eaton] Improved documentation of Neighbor

27 * TProb<T>:

28 - Added divided_by(const TProb<T>&) const

29 - Added constructor TProb<T>( const std::vector<S> &v )

30 - Added size_t draw(), which draws a random index

31 - [Frederik Eaton] Added setUniform()

32 - [Frederik Eaton] Added sumAbs()

33 - [Frederik Eaton] Added argmax()

34 - [Giuseppe Passino] Added begin(), end()

35 * TFactor<T>:

36 - [Giuseppe Passino] Added begin(), end()

37 - [Charles Vaske] Added TFactor( const std::vector<Var> &vars, const std::vector<T> &p ),

38 which reorders variables to canonical ordering before storing the table

39 - Added constructor TFactor<T>( const VarSet &vars, const std::vector<S> &v )

40 - Extended functionality of TFactor<T>::operators +,-,+=,-= to handle different VarSets

41 - Added TFactor<T>::maxMarginal (similar to marginal but with max instead of sum)

42 * State:

43 - [Giuseppe Passino] Added prefix ++ operator

44 * Permute:

45 - [Charles Vaske] Added constructor in Permute for canonical variable ordering

46 * FactorGraph:

47 - [Frederik Eaton] Added clampVar()

48 - [Frederik Eaton] Added clampFactor()

49 - [Giuseppe Passino] Added begin(), end()

50 * PropertySet:

51 - Added keys(), for getting all keys

52 - [Frederik Eaton] Added default constructor

53 - [Frederik Eaton] Added constructor from string

54 * InfAlg:

55 - Added setProperties(), getProperties() and printProperties()

56 - [Frederik Eaton] Added beliefV(), beliefF()

57 * ExactInf:

58 - Added calcMarginal(const VarSet &)

59 * HAK:

60 - Added "init" parameter to allow for random initialization

61 * BP:

62 - [Giuseppe Passino] Added findMaximum(), which can be used after running

63 max-product BP to construct a global state with maximum probability

64 * JTree:

65 - Added findMaximum(), which can be used after running

66 max-product JTree to construct a global state with maximum probability

67 * MatLab interface:

68 - MEX file dai now also returns variable and factor beliefs

69 - [Sebastian Nowozin] MEX file dai now also optionally returns the MAP state

70 (only for BP and JTree)

71 * README is now created automatically from doxygen documentation

72 * [Frederik Eaton] Added script for automatically generating properties code (used by CBP and BBP)

73 * [Frederik Eaton] Added newInfAlgFromString to alldai.h/cpp

74 * [Frederik Eaton] Added some utility macros (DAI_PV, DAI_DMSG, DAI_IFVERB)

75 and functions (concat(),rnd()) to util.h

76 * Changed output stream operator<< for Var and VarSet

77 * [Frederik Eaton] Improved parsing code in tests/testdai to allow recursive

78 alias substitutions

79 * [Frederik Eaton] Added useful aliases to aliases.conf

80 * [Giuseppe Passino] Optimised maximum-residual BP by using a reversed ordered

81 set instead of the linear search (which can yield enormous speedups - a

82 factor 500 has been measured on a binary Ising grid with 128x128 variables!)

83 * Added debug assertions to Var which check for inconsistent dimensions of

84 variables with the same labels

85 * toc() now returns POSIX system time with maximum accuracy of microseconds

86 * Exception objects now remember their error code

87 * Examples:

88 - Moved example.cpp to examples/

89 - Added examples/example_bipgraph.cpp

90 - Added examples/example_varset.cpp

91 - Added examples/example_sprinkler.cpp

92 - Added examples/example_permute.cpp

93 - Added python and octave ports for examples/example_sprinkler.cpp

95 Build system:

96 * Improved Makefile:

97 - Merged Makefile.win and Makefile.shared into Makefile

98 - Macros DAI_VERSION and DAI_DATE have been introduced,

99 in order to store this information in a central place

100 - Introduced CCNODEBUGFLAGS in Makefile

101 - Switched Makefile.win to GNU Make syntax

102 - [Frederik Eaton] Added TAGS, lib targets to Makefile

103 * Compatibility:

104 - [Peter Gober] libDAI can now be built on Cygwin

105 - [Dan Preston] libDAI can now be built on Mac OS X

106 - Changed regression test so that it also works under Windows

108 Interface changes (the old interface is marked obsolete and will be removed in the next release):

109 * Replaced VarSet::calcState() by non-member calcLinearState()

110 * Replaced VarSet::calcStates() by non-member calcState()

111 * Variable labels are now nonnegative (of type size_t)

112 * Renamed Treewidth(const FactorGraph &) into boundTreewidth(const FactorGraph &)

113 * Replaced UEdgeVec by Graph

114 * Replaced DEdgeVec by new RootedTree class

115 * Moved functionality of GrowRootedTree() into constructor of RootedTree

116 * Merged calcPairBeliefsNew() into calcPairBeliefs()

117 * Removed calcMarginal2ndO()

118 * Renamed RegionGraph::Check_Counting_Numbers into RegionGraph::checkCountingNumbers

119 * Renamed RegionGraph::Calc_Counting_Numbers into RegionGraph::calcCountingNumbers

120 * Renamed Permute::convert_linear_index into Permute::convertLinearIndex

121 * Changed FactorGraph::clamp and DAIAlg::clamp interfaces (the variable to be

122 clamped is now indicated by its index, not as a Var)

123 * Replaced TProb<T>::log0() by TProb<T>::log(true)

124 * Replaced TProb<T>::takeLog0() by TProb<T>::takeLog(true)

125 * Removed TProb<T>::hasNonPositives()

126 * Replaced TFactor<T>::log0() by TFactor<T>::log(true)

127 * Removed TFactor<T>::divided_by, use operator/ instead

128 * Removed TFactor<T>::divide, use operator/= instead

129 * Removed TFactor<T>::partSum(const VarSet&), use marginal(const VarSet&,false) instead

130 * Renamed smallSet<T> to SmallSet<T>

131 * Renamed TProb<T>::minVal() to TProb<T>::min()

132 * Renamed TProb<T>::maxVal() to TProb<T>::max()

133 * Renamed TProb<T>::totalSum() to TProb<T>sum()

134 * Renamed TFactor<T>::minVal() to TFactor<T>::min()

135 * Renamed TFactor<T>::maxVal() to TFactor<T>::max()

136 * Renamed TFactor<T>::totalSum() to TFactor<T>::sum()

137 * Removed class Diffs

138 * [Frederik Eaton] Added backwards compatibility layer for edge interface to

139 BipartiteGraph and FactorGraph (which will be obsoleted soon)

141 Bug fixes:

142 * Fixed reversal of min and max in

143 TFactor<T> min( const TFactor<T> &, const TFactor<T> & )

144 TFactor<T> max( const TFactor<T> &, const TFactor<T> & )

145 * [Sebastian Nowozin] Fixed memory leak in MEX file dai

146 * [Frederik Eaton] In PropertySet::getStringAs(), check for typeid(ValueType)

147 before typeid(std::string) (this fixes a strange bug for empty string property)

148 * Added work-around for bug in Boost Graph Library

149 * Fixed bug in MaxSpanningTree (it wrongly assumed that the tree was not empty).

150 * Fixed bug in calcMarginal and calcPairBeliefs where states with zero probability

151 mass were clamped, leading to NaNs or assertion errors (thanks to Dan Preston

152 for reporting this)

155 libDAI-0.2.2 (2008-09-30)

156 -------------------------

158 New features:

159 * Approximate inference methods now report the number of iterations needed.

160 * Added damping to various algorithms to improve convergence properties.

161 * Added more features to utils/createfg for creating factor graphs.

162 * Added ExactInf class for brute force exact inference.

163 * [Giuseppe Pasino] Added "logdomain" property to BP, a boolean that controls

164 whether calculations are done in the log-domain or in the linear domain;

165 doing calculations in the log-domain may help if the numerical range

166 of a double is too small.

167 * [Claudio Lima] Added Max-Product functionality to BP.

168 * Improved documentation.

170 Improved architecture:

171 * Added Exceptions framework.

172 * Pervasive change of BipartiteGraph implementation (based on an idea by

173 Giuseppe Passino). BipartiteGraph no longer stores the node properties

174 (former _V1 and _V2), nor does it store a dense adjacency matrix anymore,

175 nor an edge list. Instead, it stores the graph structure as lists of

176 neighboring nodes. This yields a significant memory/speed improvement for

177 large factor graphs, and is more elegant as well. Iterating over neighbors is

178 made easy by using boost::foreach.

179 * Added conditional compilation of inference methods.

180 * VarSet is now implemented using a std::vector<Var> instead of a

181 std::set<Var>, which yields a significant speed improvement. Furthermore,

182 the implementation has been generalized, resulting in the small_set<T> class

183 which can be used to represent sets of small cardinality; VarSet is the

184 specialization with T = Var.

185 * Improved ClusterGraph implementation, yielding significant speedups

186 for the JunctionTree algorithm on large factorgraphs.

188 Code cleanup:

189 * Moved everything into namespace "dai".

190 * Renamed DEBUG to DAI_DEBUG to avoid conflicts.

191 * Replaced ENUM2,ENUM3,ENUM4,ENUM5,ENUM6 by single DAI_ENUM macro.

192 * Removed utils/remove_short_loops and matlab/remove_short_loops.

193 * Replaced sub_nb class in mr.h by boost::dynamic_bitset.

194 * Improved index.h:

195 - Renamed Index -> IndexFor

196 - Added some .reserve()'s to IndexFor methods which yields a

197 25% speedup of testregression

198 - Replaced multind by Permute

199 - Added MultiFor

200 - Added State

201 * New funcstionality of factor.h.

202 * Moved Properties and MaxDiff frameworks from InfAlg to each individual

203 inference algorithm, because the Properties framework was not as

204 convenient as I hoped, and not every inference algorithm needs a maxdiff

205 variable. Also, replaced some FactorGraph functionality in InfAlg by a

206 function that returns the FactorGraph. The result is cleaner (less

207 entangled) code.

208 * Removed x2x.

209 * Replaced Complex with real numbers (negative potentials are just too rare

210 to warrant the additional "complexity" :)).

212 Miscellaneous improvements:

213 * Now compiles also with MS Visual C++ (thanks to Jiuxiang Hu) and with

214 GCC under cygwin.

215 * Contributions by Peter Gober:

216 - Renamed variable _N in mr.* for compatibility with g++ under cygwin.

217 * Misc contributions by Giuseppe Passino:

218 - removed "using namespace std;" from header files - bad practice;

219 - moved header files in include/dai and sources in src;

220 - changed #ifndefs to GNU style;

221 - added extra warning checks (-W -Wextra) and fixed resulting warnings;

222 - dai::TProb:

223 o removed copy constructor and assignment operators (redundant);

224 o implementation of some methods via STL algorithms;

225 o added methods takeExp, takeLog, takeLog0 for transformation in-place;

226 o explicit constructor (prevents implicit conversion from size_t to TProb);

227 o added operator+,+=,-,-=, with argument T (for calculations in log-scale);

228 * Misc contributions by Christian Wojek:

229 - New FactorGraph constructor that constructs from given ranges of factors

230 and variables;

231 - Optimization of FactorGraph constructors using tr1::unordered_map.

232 * FactorGraph constructors no longer check for short loops (huge speed

233 increase for large factor graphs), nor for negative entries. Also, the

234 normtype is now Prob::NORMPROB by default.

235 * Improved MaxSpanningTreePrims algorithm (uses boost::graph).

237 Interface changes:

238 * VarSet::

239 - VarSet::stateSpace() -> nrStates(const VarSet &)

240 - VarSet( const std::set<Var> ) -> VarSet( begin, end, sizeHint=0 )

241 - VarSet( const std::vector<Var> ) -> VarSet( begin, end, sizeHint=0 )

242 - removed bool operator||

243 - operator&&(const VarSet&) -> intersects(const VarSet&)

244 - operator&&(const Var&) -> contains(const Var&)

245 * FactorGraph::

246 - delta(const Var &) -> delta(size_t)

247 - Delta(const Var &) -> Delta(size_t)

248 - makeCavity(const Var &) -> makeCavity(size_t)

249 - vars() -> vars

250 - factors() -> factors

251 - removed MakeFactorCavity(size_t)

252 - removed ExactMarginal(const VarSet &)

253 - removed ExactlogZ()

254 - removed updatedFactor(size_t)

255 - removed _normtype and NormType()

256 - removed hasShortLoops(...) and removeShortLoops(...)

257 - WriteToDotFile(const char *filename) -> printDot( std::ostream& os )

258 - undoProb(size_t) -> restoreFactor(size_t)

259 - saveProb(size_t) -> backupFactor(size_t)

260 - undoProbs(const VarSet &) -> restoreFactors(const VarSet &)

261 - saveProbs(const VarSet &) -> backupFactors(const VarSet &)

262 - ReadFromFile(const char*) returns void (throws on error)

263 - WriteToFile(const char*) returns void (throws on error)

264 - removed hasNegatives()

265 * RegionGraph::

266 - nr_ORs() -> nrORs()

267 - nr_IRs() -> nrIRs()

268 - ORs() -> ORs

269 - IRs() -> IRs

270 * *::Regenerate() -> *::construct()

271 * Renamed Index -> IndexFor

272 * Diffs:

273 - max() -> maxDiff()

274 - max_size() -> maxSize()

275 * Prob::max() -> Prob::maxVal()

276 * Factor::

277 - max() -> maxVal()

278 - part_sum() -> partSum()

279 * toc() in util.h now returns seconds as a double

280 * VarSet::operator&&

281 * Properties -> PropertySet

284 libDAI-0.2.1 (2008-05-26)

285 -------------------------

287 Bugfix release.

288 * added missing cstdio header in util.h

289 * fixed Properties in MR_CLAMPING_* and MR_EXACT_*

290 * added description of the factor graph fileformat

291 * improved Makefile

294 libDAI-0.2.0 (2006-11-30)

295 -------------------------

297 First public release.

300 0.1.5 (2006-11-30)

301 ------------------

303 Regressions

305 - tests/testlcbp and tests/testlcbp are broken.

306 - EXACT method does not work anymore.

307 - The Properties framework gives a speed penalty because of the lookup

308 costs involved; inner loops should be optimized.

310 General framework

312 - DAIAlg is now a template class; typedefs for DAIAlg<FactorGraph> and for

313 DAIAlg<RegionGraph> are provided. In this way, we do not have to write "wrapper"

314 functions to forward functionality from either FactorGraph or RegionGraph

315 to DAIAlg. Functionality like clamping can be implemented in FactorGraph

316 and in RegionGraph and no explicit interface is needed in descendants.

317 - New abstract base class InfAlg added, representing an inference algorithm,

318 from which DAIAlg<T> inherits. This solves the incompatibility problems of

319 DAIAlg<T> for different T (e.g. DAIAlg<FactorGraph> was incompatible with

320 DAIAlg<RegionGraph>). More work is required to reduce code duplication

321 (make FactorGraph part of InfAlg).

322 - Added generic interface (nrVars(), Vars(), nrFactors(), factor(size_t),

323 beliefs(), belief(VarSet &), ...) to InfAlg and descendants.

324 - Added a saveProbs/undoProbs interface to InfAlg and descendants that enables

325 one to save a few factors, modify them (e.g. clamp them), and then restore them

326 to their old values. Undo should also init the corresponding messages / beliefs.

327 This can be used if a given factor graph repeatedly needs to be clamped in

328 different ways and an approximation method is run for each clamping; using the

329 saveProbs/undoProbs can give a significant speed increase.

330 - Switched to a general Properties framework that handles the parameters of

331 all inference methods in a uniform manner. The Properties class is a map of

332 several properties in boost::any objects, indexed by their names (strings).

333 It can read from a stream and write to a stream. It is recursive, in the sense

334 that a Properties object can hold a variable of type Properties as well.

335 - Added a generic way of constructing inference algorithms from a factor graph,

336 name and properties object. Added the newInfAlg function which constructs

337 the requested object. This is used by LCBP, the Matlab interface and the

338 command line (test) interface.

339 - Added a generic enum framework for enum parameters. Although implemented as a

340 hack, it is quite useful in that it drastically simplifies and reduces the

341 amount of code for handling enum parameters.

342 - Provided generic functions for calculating marginals in different ways that

343 work for all approximate inference methods.

345 Bugfixes

347 - Fixed GBP free energy.

348 - Fixed bug in junctiontree (it didn't init the _vars variable).

349 - Corrected two bugs in operator&& and operator|| in VarSet (they returned

350 the logical NOT of what they should return).

351 - Fixed bug in RegionGraph::RecomputeOR(s).

352 - Fixed bug in utils/create_dreg_fg:

353 graph structure was not random for given parameters (forgot to call srand()).

354 - TreeEP bug workaround: use the complete junction tree instead of a subtree.

355 - Fixed bug in JTree::HUGIN() and JTree:ShaferShenoy() in case of junction tree

356 that consists of one outer region only.

357 - Fixed INIT bug in LCBP2::UpdatePancake().

358 - Fixed MaxDiffs flow (except for MR).

360 New functionality

362 - HAK supports several default cluster choices:

363 minimal (only factors)

364 delta (Markov blankets)

365 loop (all loops consisting of loops consisting of <loopdepth> or less variables)

366 Only the maximal clusters are used as outer clusters.

367 - Implemented TreeEP. It generalizes the heuristic method described in the

368 Minka & Qi paper for obtaining a tree with the most relevant interactions to

369 higher order interactions. Almost all optimizations described in the Minka & Qi

370 paper are used, except that evidence is passed over the whole tree instead of

371 relevant subsets (the latter is almost implemented but buggy). Also added

372 alternative (worst-case) algorithm that uses a maximum spanning tree on the

373 weighted graph where the weight between neighbours i and j is given by

374 N(psi,i,j), where psi is the product of all the factors involving both i and j

375 (which is an upper bound on the effective interaction between i and j).

376 - Implemented MR (MontanariRizzo) based on Bastian's code, but extended it

377 to be able to handle connectivities larger than 3 (in principle, up to 32).

378 It supports different initialization methods (the original RESPPROP,

379 the CLAMPING method and EXACT which uses JTree) and different update methods

380 (FULL and LINEAR).

381 - Implemented LCBP2, an analogon of LCBP which represents pancakes as little

382 networks and uses some approximate inference method on them for calculating

383 marginals.

384 - Now there are several LCBP variants (LCBP, LCBPI, LCBPJ, LCBPK, LCBPL);

385 LCBPJ works only for pairwise, LCBPK is LCBP improved for higher order

386 interactions and LCBPL is LCBPI improved for higher-order interactions.

387 - Wrote one single program utils/createfg for creating various types of

388 random factor graphs.

389 - Wrote utility to visualize factor graphs using graphviz.

390 (it uses the BOOST Program Options library)

391 - Added fginfo utility that displays some info about a .fg file.

392 - Implemented Factor::strength function that calculates the potential strength

393 N(psi,i,j) between variables i and j as described in cs.IT:0504030

394 - Wrote a general MatLab interface matlab/dai (similar to tests/test);

395 this unified the matlab functions dai, dai_bp, dai_mf, dai_jt, dai_tep, dai_cvm.

396 - Added MATLAB routine that returns contraction matrix A for BP convergence analysis.

397 - Implemented a MATLAB interface ai_potstrength for Factor::strength

398 - Added Martijn's x2x

400 Improvements of existing code

402 - Reimplemented RegionGraph and descendants: a RegionGraph ISA FactorGraph

403 and also a BipartiteGraph<FRegion,Region>. It now also keeps a map that

404 associates outer region indices to factor indices (no powers yet, this

405 is deemed superfluous) and provides functions to recompute (some of) the

406 outer regions from the factors.

407 - InfAlg descendants run() methods now stop immediately and return NAN in case

408 they detect NANs. Only BP does not do NAN checking for performance reasons.

409 - LCBP now works with factors containing zeroes (by defining x/0 = 0).

410 - HAK, GBP and DoubleLoop now conform to the standards for verbose reporting,

411 timing and convergence criteria.

412 - Implemented logZ() for JTree. It does the calculation during message-passing.

413 - Marginal2ndO now optionally divides by the single node beliefs (to the power n-2);

414 hopefully this will give more accurate approximations.

415 - Marginal and Marginal2ndO (optionally) use the new saveProbs/undoProbs functionality

416 for a faster way of calculating marginals, which does not require a call to init()

417 nor cloning the whole object for each clamping. This leads to a significant speedup.

418 - LCBP (and LCBP2) now have complete flexibility in the specification of the

419 inner method, i.e. the method used to generate the initial cavity approximations.

420 One can pass two strings, a name and a properties string, and LCBP simply invokes

421 newInfAlg to construct the corresponding inference algorithm and uses the generic

422 marginal functions to approximate cavity marginals.

423 - Replaced the global "method" variable by local properties and removed ai.h

424 - Added some methods to Factor (operators *, *=, /, /= with doubles as

425 second argument, operators -, +=, -= with other Factors as second

426 arguments, randomize(), RemoveFirstOrderInteractions) and similar

427 operations to Prob

428 - Moving towards boost::program_options for handling command line arguments

429 (tests/test is done).

430 - Renamed some FactorGraph methods:

431 nr_vars -> nrVars

432 nr_factors -> nrFactors

433 varind -> findVar

434 factorind -> findFactor

435 makeFacCavity -> makeFactorCavity

436 - LCBP_SEQMAXRES has been removed because it did strange things.

437 - Implemented RandomDRegularGraph

438 - Implemented JTree::calcMarginal for marginals that are not confined

439 within one cluster (using cut-set conditioning).

440 - Added isConnected() method to FactorGraph (some methods do not work with

441 disconnected factor graphs).

442 - Pair beliefs are now calculated in a symmetrical way by calcPairBeliefs

443 - Removed single node interaction "correction" code from clamping methods

444 - Removed calcCavityDist and calcCavityDist2ndO

445 - No longer depends on GSL.

446 - Increased portability by combining platform dependant utility functions

447 in util.{h,cpp}.

448 - Wrote *.m files providing help

450 Testing framework

452 - Made a new and significantly improved testing framework that provides most

453 functionality from the command line.

454 - The basis is provided by tests/test, which uses the newInfAlg functionality

455 and enables the user to easily compare from the command line different

456 inference methods on a given factorgraph. All parameters can be specified.

457 Output consists of CPU time, average and maximum single variable marginal

458 errors, relative logZ error and MaxDiff().

459 - tests/aliases.conf contains aliases for standard combinations of methods

460 and their options (which can be used in tests/test).

461 - tests/large contains several bash/python scripts that create random factor

462 graphs, compare several approximate inference algorithms (using tests/test) and

463 allow for easy visualization of the results using PyX.

464 - Added several .fg files for test purposes to /tests (e.g. two ALARM versions

465 alarm.fg and alarm_bnt.fg; testfast.fg, a 4x4 periodic Ising grid for

466 regression testing).

467 - Added a regression test to the Makefile which is included in the standard

468 target. It compares all inference methods on tests/testfast.fg with the

469 results stored in tests/testfast.out

471 Miscellaneous

473 - Expanded all tabs to spaces (":set tabstop 4\n:set expandtab\n:retab" in vim)

474 - Experimental MATLAB code added for StarEP approximation on cavity

475 - Renamed project to libDAI and changed directory name accordingly.

476 - Renamed JunctionTree to JTree.

477 - Fixed licensing (now it's officially GPL).

478 - Improved README

481 revision 252

482 ------------

484 Functionality

485 - Added RegionGraph, GBP, CVM and HAK (double-loop).

486 - Added JunctionTree (with two update algorithms, HUGIN and Shafer-Shenoy), which is a

487 RegionGraph.

488 - NormType is now chosen automatically (in case of negative factors, Prob::NORMLINF is used,

489 otherwise the default Prob::NORMPROB is used). Also, in case of negative factors, the

490 RegionGraph constructors assign each Factor to a unique outer region instead of dividing

491 it over all subsuming outer regions. See README for when negative factors are known to work

492 and when not.

493 - FactorGraph::FactorGraph(const vector<Factor>) only gives a warning in case of short loops,

494 it does not automatically merge factors anymore.

495 - Removed BP_SEQMAXRESNOCLEAR (all cavity initialization methods now are implicitly NOCLEAR)

496 - Added MATLAB interface functions ai_readfg, ai_removeshortloops and ai_bp

497 - Added LCBP-III type that should be equivalent to LCBP-II, but can handle zeroes

498 in potentials. Note that it is significantly slower than LCBP-II (and has to be reimplemented

499 such that it does not store the complete pancakes, but represents them as little factor graphs).

501 Implementation / code

502 - Made a seperate type WeightedGraph, which until now only implements Prim's

503 maximal spanning tree algorithm and is only used by the junction tree code. It might

504 be good to make it a class somewhere in the future and extend it's interface.

505 - Made a seperate class ClusterGraph, which is only used by the junction tree

506 code. It's main purpose is a graph-theoretical variable elimination algorithm.

507 - Implemented the heuristic "minimum-new-edges-in-clique-graph" for variable elimination.

508 - Massive code cleanup, moving towards "generic" programming style, using

509 multiple inheritance and polymorphism.

510 o BP, LCBP, MF, HAK and JunctionTree now inherit from a common DAIAlg class

511 o Made generic functions Marginal, Marginal2ndO, calcCavityDist, calcCavityDist2ndO, clamp

512 that can be used by FactorGraph-based DAIAlgs.

513 o Created TProb<T> class, which stores a probability vector (without the accompanying indexing

514 and VarSet) and provides functionality for it (which is used by TFactor<T>).

515 o Rewrote the VarSet class. It now caches its statespace(). It now privately inherits from set<Var>.

516 I had to overload the insert methods of set<Var> so that they calculate the new statespace.

517 o Rewrote the TFactor class. The TFactor class now HAS a TProb and HAS a VarSet.

518 - Rewrote BP to use the new TProb<T> interface. Performance of BP improved up to a factor 6 by:

519 o using Prob's instead of Factor's;

520 o splitting the multiplication of the messages into two parts (thanks to Vicenc!);

521 o optimizing the calculation of the beliefs (only the message calculations were optimized till now).

522 o replacing FactorGraph::_nb1 and _nb2 (which were set<size_t>) by vector<size_t>

523 - LCBP now seperately stores cavitydists and pancakes. Added InitPancakes() method

524 that takes the cavitydists and multiplies them with the relevant factors. This

525 resulted in an API change in AI which now accepts and returns initial cavitydists

526 instead of initial pancakes.

528 Minor changes

529 - Started writing DoxyGen documentation

530 - Renamed lcptab2fg.m matlab/ai_writefg.m

531 - Moved all matlab stuff to matlab/

532 - More detailed reporting (also reports clocks used).

533 - Marginal and Marginal2ndO now use *differences* in logZ to avoid NaNs.

534 - Improved testing suite.

535 - Removed logreal support.

536 - FactorGraph now also supports input streams and ignores comment lines in .fg files.

537 - Added tests/create_full_fg.cpp and tests/create_ising_fg.cpp which create

538 full and periodic 2D Ising networks according to some command line parameters.

539 - Now logZ really returns logZ instead of -logZ.

540 - Added FactorGraph::WriteToDotFile

543 0.1.4 (2006-04-13)

544 ------------------

545 - Added file IO routines to read and write factorgraphs.

546 - Added L-infinity normalization for use with (partially) negative factors.

547 - Renamed BetheF, MFF to logZ, which now use complex numbers to be able to

548 handle (partially) negative factors.

549 - Added test suite.

550 - All probabilities are now represented using double instead of LogReal<double>.

551 - Combined Alg and Alg3 into LCBP. Several update schemes possible.

552 - Combined several variants of BP into doBP. Several update schemes possible.

553 Now uses precalculated indices for optimization.

554 - Renamed Node -> Var and Potential -> Factor.

555 - Extensive code cleanup. More use of OO techniques. Changed API.

556 - MaxIter now means maximum number of passes (corresponding to number of

557 _parallel_ updates).

558 - MaxDiff now means the maximum L-infinity distance between the updated and

559 original single variable beliefs, for all AI methods.

560 - Implemented RBP which converges faster than BP for difficult problems.

561 - Now uses method parameter which is a bitmask combining outmethod and inmethod

562 (see ai.h).

565 0.1.3 (2006-03-22)

566 --------------------

567 - All AI methods now return maxdiff

568 - ai.cpp:

569 o Now returns maxdiffinner and maxdiffouter

570 o New BP2ndO innermethod (estimate only 2nd order cavity interactions)

571 o New InitCav outermethod (only create initial cavity distributions)

572 - bp.cpp:

573 o New CavityDist2ndO which estimates 2nd order cavity interactions

574 - Makefile:

575 o Bugfix: removed dependencies on algwim.*

578 0.1.2 (2006-02-28)

579 --------------------

580 - Cleaned up alg.cpp (removed Alg2 and its corresponding data structures).

581 - Added the possibility to provide initial cavity distributions as an input

582 argument to ai (not much error checking is done, so be careful).

583 - Potentials2mx now correctly sets the dimensions of the P field (i.e. for

584 the output arguments Q, Q0 of ai).

585 - Removed algwim.* since it does not work.

588 0.1.1 (2006-02-28)

589 --------------------

590 - The constructors of (Log)FactorGraph and LogFactorGraph from a

591 vector<(Log)Potential> now merge potentials to prevent short loops (of length

592 4) in the factor graph. These are used in ai to construct the factor graphs

593 from the psi argument. If compiled with DEBUG defined, the method calc_nb()

594 of BipGraph checks for the existence of short loops.

595 - Changed calling syntax of ai (now the actual syntax *does* correspond to its

596 description in the help).

597 - ai does not hook cout anymore (which caused weird segfaults).

598 - Fixed a bug in an assert statement in the matlab interface code in ai.cpp.

599 - Removed network.* since it is not useful.

602 0.1.0 (2006-02-28)

603 --------------------

604 First version worthy a version number.