1 git HEAD

2 --------

4 * Removed deprecated functionality

5 * Updated ChangeLog for libDAI-0.2.4 (forgot a few entries)

8 libDAI-0.2.4 (2010-02-11)

9 -------------------------

11 New features:

12 * Implemented Tree-Reweighted BP

13 * [Frederik Eaton] Implemented Fractional Belief Propagation

15 Miscellaneous improvements:

16 * Improved documentation

17 * [Frederik Eaton] Added constructors for BBPCostFunction

18 * [Frederik Eaton] Added accessor/mutator for the elements of a SmallSet<>

19 * [Frederik Eaton] Added unary minus to TProb<>

20 * [Frederik Eaton] Added Hellinger distance to TProb<>::DistType

21 * [Frederik Eaton] Two small patches for src/jtree.cpp and utils/createfg.cpp

22 * tests/testdai option "marginals" now has three possible values: NONE

23 outputs no marginals, VAR only variable marginals, and ALL outputs all

24 marginals calculated by the algorithm.

25 * Strengthened convergence criteria of various algorithms

26 * Added GraphAL, an adjacency list implementation for graphs,

27 similar to (but simpler than) BipartiteGraph

28 * Added some functionality to create various standard factors

29 (the functions whose names start with "createFactor")

30 * Added examples example_sprinkler_gibbs and example_sprinkler_em

31 * Implemented various heuristics for choosing a variable elimination sequence

32 in JTree

33 * Added BETHE method for GBP/HAK cluster choice

34 * Made alias support official part of the library

36 Build system:

37 * Moved platform independent build options into Makefile.ALL

38 * Windows platform now needs Boost 1.37 or higher

40 Code cleanup:

41 * Cleaned up utils/createfg and tests/testdai

42 * Cleanup of some duplicate code in BP, FBP, TRWBP

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

45 * Removed obsolete/deprecated stuff

46 * Renamed Graph into GraphEL (for Graph, implemented as Edge List)

47 * Renamed some functions of BipartiteGraph:

48 add1() -> addNode1()

49 erase1() -> eraseNode1()

50 nr1() -> nrNodes1()

51 add2() -> addNode2()

52 erase2() -> eraseNode2()

53 nr2() -> nrNodes2()

54 * Renamed some functions in ClusterGraph:

55 ClusterGraph::eliminationCost() -> ::eliminationCost_MinFill()

56 ClusterGraph::VarElim() -> ClusterGraph::VarElim( sequentialVariableElimination( ElimSeq ) )

57 ClusterGraph::VarElim_MinFill() -> ClusterGraph::VarElim( greedyVariableElimination( eliminationCost_MinFill ) )

58 * Changed interface of one RegionGraph constructor

59 * Renamed "Clamped BP" into "Conditioned BP"

61 Bug fixes:

62 * Fixed regression in scripts/regenerate-properties (now all errors are

63 gathered before throwing the exception, as used to be the case)

64 * Fixed FTBFS errors on MACOSX (thanks to Sebastian Riedel for reporting this bug)

65 * [Alexander Schwing] Fixed error in BP that occured with damping

66 and using log-domain updates

67 * Fixed bug in HAK for trivial region graphs (with only one outer region

68 and no inner regions), reported by Alejandro Lage.

69 * Fixed long-standing bug in TreeEP (now, within-loop propagation optimization works)

72 libDAI-0.2.3 (2009-11-16)

73 -------------------------

75 New features:

76 * Complete doxygen documentation (although more detailed documentation still

77 has to be written)

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

79 Expectation Maximization

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

81 octave interfaces

82 * Added Max-Product functionality to JTree

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

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

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

87 Code cleanup:

88 * Updated copyright headers

89 * Cleaned up error handling by introducing the DAI_THROWE macro

90 * Introduced DAI_DEBASSERT macro to abbreviate a common pattern

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

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

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

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

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

97 Miscellaneous improvements:

98 * BipartiteGraph:

99 - Added eraseEdge( size_t n1, size_t n2 )

100 - [Frederik Eaton] Improved documentation of Neighbor

101 * TProb<T>:

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

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

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

105 - [Frederik Eaton] Added setUniform()

106 - [Frederik Eaton] Added sumAbs()

107 - [Frederik Eaton] Added argmax()

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

109 * TFactor<T>:

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

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

112 which reorders variables to canonical ordering before storing the table

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

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

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

116 * State:

117 - [Giuseppe Passino] Added prefix ++ operator

118 * Permute:

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

120 * FactorGraph:

121 - [Frederik Eaton] Added clampVar()

122 - [Frederik Eaton] Added clampFactor()

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

124 * PropertySet:

125 - Added keys(), for getting all keys

126 - [Frederik Eaton] Added default constructor

127 - [Frederik Eaton] Added constructor from string

128 * InfAlg:

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

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

131 * ExactInf:

132 - Added calcMarginal(const VarSet &)

133 * HAK:

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

135 * BP:

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

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

138 * JTree:

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

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

141 * MatLab interface:

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

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

144 (only for BP and JTree)

145 * README is now created automatically from doxygen documentation

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

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

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

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

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

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

152 alias substitutions

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

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

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

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

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

158 variables with the same labels

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

160 * Exception objects now remember their error code

161 * Examples:

162 - Moved example.cpp to examples/

163 - Added examples/example_bipgraph.cpp

164 - Added examples/example_varset.cpp

165 - Added examples/example_sprinkler.cpp

166 - Added examples/example_permute.cpp

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

169 Build system:

170 * Improved Makefile:

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

172 - Macros DAI_VERSION and DAI_DATE have been introduced,

173 in order to store this information in a central place

174 - Introduced CCNODEBUGFLAGS in Makefile

175 - Switched Makefile.win to GNU Make syntax

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

177 * Compatibility:

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

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

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

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

183 * Var:

184 - Variable labels are now nonnegative (of type size_t)

185 * VarSet:

186 - Replaced calcState() by non-member calcLinearState()

187 - Replaced calcStates() by non-member calcState()

188 * Permute:

189 - Renamed convert_linear_index into convertLinearIndex

190 * TProb<>:

191 - Replaced log0() by log(true)

192 - Replaced takeLog0() by takeLog(true)

193 - Removed hasNonPositives()

194 - Renamed minVal() to min()

195 - Renamed maxVal() to max()

196 - Renamed totalSum() to sum()

197 * TFactor<>:

198 - Replaced log0() by TFactor<T>::log(true)

199 - Removed divided_by, use operator/ instead

200 - Removed divide, use operator/= instead

201 - Removed partSum(const VarSet&), use marginal(const VarSet&,false) instead

202 - Renamed minVal() to min()

203 - Renamed maxVal() to max()

204 - Renamed totalSum() to sum()

205 * FactorGraph:

206 - Changed clamp and clamp interfaces (the variable to be

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

208 * RegionGraph:

209 - Renamed Check_Counting_Numbers into checkCountingNumbers

210 - Renamed Calc_Counting_Numbers into calcCountingNumbers

211 * Miscellaneous:

212 - Renamed Treewidth(const FactorGraph &) into boundTreewidth(const FactorGraph &)

213 - Replaced UEdgeVec by Graph

214 - Replaced DEdgeVec by new RootedTree class

215 - Moved functionality of GrowRootedTree() into constructor of RootedTree

216 - Merged calcPairBeliefsNew() into calcPairBeliefs()

217 - Removed calcMarginal2ndO()

218 - Renamed smallSet<T> to SmallSet<T>

219 - Removed class Diffs

220 - [Frederik Eaton] Added backwards compatibility layer for edge interface to

221 BipartiteGraph and FactorGraph (which will be obsoleted soon)

223 Bug fixes:

224 * Fixed reversal of min and max in

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

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

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

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

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

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

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

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

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

234 for reporting this)

237 libDAI-0.2.2 (2008-09-30)

238 -------------------------

240 New features:

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

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

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

244 * Added ExactInf class for brute force exact inference.

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

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

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

248 of a double is too small.

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

250 * Improved documentation.

252 Improved architecture:

253 * Added Exceptions framework.

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

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

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

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

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

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

260 made easy by using boost::foreach.

261 * Added conditional compilation of inference methods.

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

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

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

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

266 specialization with T = Var.

267 * Improved ClusterGraph implementation, yielding significant speedups

268 for the JunctionTree algorithm on large factorgraphs.

270 Code cleanup:

271 * Moved everything into namespace "dai".

272 * Renamed DEBUG to DAI_DEBUG to avoid conflicts.

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

274 * Removed utils/remove_short_loops and matlab/remove_short_loops.

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

276 * Improved index.h:

277 - Renamed Index -> IndexFor

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

279 25% speedup of testregression

280 - Replaced multind by Permute

281 - Added MultiFor

282 - Added State

283 * New funcstionality of factor.h.

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

285 inference algorithm, because the Properties framework was not as

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

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

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

289 entangled) code.

290 * Removed x2x.

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

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

294 Miscellaneous improvements:

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

296 GCC under cygwin.

297 * Contributions by Peter Gober:

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

299 * Misc contributions by Giuseppe Passino:

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

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

302 - changed #ifndefs to GNU style;

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

304 - dai::TProb:

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

306 o implementation of some methods via STL algorithms;

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

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

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

310 * Misc contributions by Christian Wojek:

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

312 and variables;

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

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

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

316 normtype is now Prob::NORMPROB by default.

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

319 Interface changes:

320 * VarSet::

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

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

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

324 - removed bool operator||

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

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

327 * FactorGraph::

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

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

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

331 - vars() -> vars

332 - factors() -> factors

333 - removed MakeFactorCavity(size_t)

334 - removed ExactMarginal(const VarSet &)

335 - removed ExactlogZ()

336 - removed updatedFactor(size_t)

337 - removed _normtype and NormType()

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

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

340 - undoProb(size_t) -> restoreFactor(size_t)

341 - saveProb(size_t) -> backupFactor(size_t)

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

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

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

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

346 - removed hasNegatives()

347 * RegionGraph::

348 - nr_ORs() -> nrORs()

349 - nr_IRs() -> nrIRs()

350 - ORs() -> ORs

351 - IRs() -> IRs

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

353 * Renamed Index -> IndexFor

354 * Diffs:

355 - max() -> maxDiff()

356 - max_size() -> maxSize()

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

358 * Factor::

359 - max() -> maxVal()

360 - part_sum() -> partSum()

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

362 * VarSet::operator&&

363 * Properties -> PropertySet

366 libDAI-0.2.1 (2008-05-26)

367 -------------------------

369 Bugfix release.

370 * added missing cstdio header in util.h

371 * fixed Properties in MR_CLAMPING_* and MR_EXACT_*

372 * added description of the factor graph fileformat

373 * improved Makefile

376 libDAI-0.2.0 (2006-11-30)

377 -------------------------

379 First public release.

382 0.1.5 (2006-11-30)

383 ------------------

385 Regressions

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

388 - EXACT method does not work anymore.

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

390 costs involved; inner loops should be optimized.

392 General framework

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

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

396 functions to forward functionality from either FactorGraph or RegionGraph

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

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

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

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

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

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

403 (make FactorGraph part of InfAlg).

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

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

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

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

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

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

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

411 saveProbs/undoProbs can give a significant speed increase.

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

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

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

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

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

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

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

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

420 command line (test) interface.

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

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

423 amount of code for handling enum parameters.

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

425 work for all approximate inference methods.

427 Bugfixes

429 - Fixed GBP free energy.

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

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

432 the logical NOT of what they should return).

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

434 - Fixed bug in utils/create_dreg_fg:

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

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

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

438 that consists of one outer region only.

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

440 - Fixed MaxDiffs flow (except for MR).

442 New functionality

444 - HAK supports several default cluster choices:

445 minimal (only factors)

446 delta (Markov blankets)

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

448 Only the maximal clusters are used as outer clusters.

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

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

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

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

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

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

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

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

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

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

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

460 It supports different initialization methods (the original RESPPROP,

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

462 (FULL and LINEAR).

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

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

465 marginals.

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

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

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

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

470 random factor graphs.

471 - Wrote utility to visualize factor graphs using graphviz.

472 (it uses the BOOST Program Options library)

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

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

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

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

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

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

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

480 - Added Martijn's x2x

482 Improvements of existing code

484 - Reimplemented RegionGraph and descendants: a RegionGraph ISA FactorGraph

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

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

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

488 outer regions from the factors.

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

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

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

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

493 timing and convergence criteria.

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

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

496 hopefully this will give more accurate approximations.

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

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

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

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

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

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

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

504 marginal functions to approximate cavity marginals.

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

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

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

508 arguments, randomize(), RemoveFirstOrderInteractions) and similar

509 operations to Prob

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

511 (tests/test is done).

512 - Renamed some FactorGraph methods:

513 nr_vars -> nrVars

514 nr_factors -> nrFactors

515 varind -> findVar

516 factorind -> findFactor

517 makeFacCavity -> makeFactorCavity

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

519 - Implemented RandomDRegularGraph

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

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

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

523 disconnected factor graphs).

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

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

526 - Removed calcCavityDist and calcCavityDist2ndO

527 - No longer depends on GSL.

528 - Increased portability by combining platform dependant utility functions

529 in util.{h,cpp}.

530 - Wrote *.m files providing help

532 Testing framework

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

535 functionality from the command line.

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

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

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

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

540 errors, relative logZ error and MaxDiff().

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

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

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

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

545 allow for easy visualization of the results using PyX.

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

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

548 regression testing).

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

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

551 results stored in tests/testfast.out

553 Miscellaneous

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

556 - Experimental MATLAB code added for StarEP approximation on cavity

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

558 - Renamed JunctionTree to JTree.

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

560 - Improved README

563 revision 252

564 ------------

566 Functionality

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

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

569 RegionGraph.

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

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

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

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

574 and when not.

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

576 it does not automatically merge factors anymore.

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

578 - Added MATLAB interface functions ai_readfg, ai_removeshortloops and ai_bp

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

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

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

583 Implementation / code

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

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

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

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

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

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

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

591 multiple inheritance and polymorphism.

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

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

594 that can be used by FactorGraph-based DAIAlgs.

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

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

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

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

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

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

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

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

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

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

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

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

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

608 instead of initial pancakes.

610 Minor changes

611 - Started writing DoxyGen documentation

612 - Renamed lcptab2fg.m matlab/ai_writefg.m

613 - Moved all matlab stuff to matlab/

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

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

616 - Improved testing suite.

617 - Removed logreal support.

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

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

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

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

622 - Added FactorGraph::WriteToDotFile

625 0.1.4 (2006-04-13)

626 ------------------

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

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

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

630 handle (partially) negative factors.

631 - Added test suite.

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

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

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

635 Now uses precalculated indices for optimization.

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

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

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

639 _parallel_ updates).

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

641 original single variable beliefs, for all AI methods.

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

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

644 (see ai.h).

647 0.1.3 (2006-03-22)

648 --------------------

649 - All AI methods now return maxdiff

650 - ai.cpp:

651 o Now returns maxdiffinner and maxdiffouter

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

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

654 - bp.cpp:

655 o New CavityDist2ndO which estimates 2nd order cavity interactions

656 - Makefile:

657 o Bugfix: removed dependencies on algwim.*

660 0.1.2 (2006-02-28)

661 --------------------

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

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

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

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

666 the output arguments Q, Q0 of ai).

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

670 0.1.1 (2006-02-28)

671 --------------------

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

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

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

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

676 of BipGraph checks for the existence of short loops.

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

678 description in the help).

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

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

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

684 0.1.0 (2006-02-28)

685 --------------------

686 First version worthy a version number.