67b73a8fc610a45618a6393290261bd9ba7736bb

1 git master HEAD

2 ---------------

4 * Made all "verbose" properties optional

5 * Unit tests should now also work on WINDOWS

6 * [Stefano Pellegrini] Fixed bug in JTree::findMaximum()

7 * Fixed some bugs in the MatLab interface build system

8 * Fixed a bug in utils/fginfo.cpp

9 * Improved mf.h/cpp:

10 - Added an "init" option that allows to initialize randomly

11 - Added an "updates" option that allows to choose between standard

12 mean field and "hard-spin" mean field

13 * utils/createfg now has a new factor type ('ISINGUNIFORM') and the old

14 'ISING' factor type has been renamed to 'ISINGGAUSS'

15 * tests/testdai option "marginals" now has five possible values: NONE

16 outputs no marginals, VAR only variable marginals, FAC only factor

17 marginals, VARFAC both types of marginals, and ALL outputs all

18 marginals calculated by the algorithm.

19 * Improved treeep.h/cpp:

20 - changed TreeEP::construct( const RootedTree& ) into

21 TreeEP::construct( const FactorGraph&, const RootedTree& )

22 - Now also supports disconnected factor graphs

23 * Improved jtree.h/cpp:

24 - changed JTree::construct( const std::vector<VarSet>&, bool ) into

25 JTree::construct( const FactorGraph&, const std::vector<VarSet>&, bool )

26 - changed JTree::GenerateJT( const std::vector<VarSet> & )

27 into JTree::GenerateJT( const FactorGraph &, const std::vector<VarSet> & )

28 - Now also supports disconnected factor graphs

29 * Improved regiongraph.h/cpp:

30 - Made (previously public) members RegionGraph::G, RegionGraph::ORs,

31 RegionGraph::IRs and RegionGraph::fac2OR protected.

32 - Removed partial constructor RegionGraph::RegionGraph( const FactorGraph& fg )

33 - Added some error checking code

34 - Renamed RegionGraph::calcCountingNumbers() into

35 RegionGraph::calcCVMCountingNumbers() and made it protected, because

36 exposing it to the world serves no purpose.

37 - Added RegionGraph::DAG() accessor which returns a reference to the

38 region graph DAG structure (currently implemented as a BipartiteGraph)

39 - Made RegionGraph::RecomputeORs(), RegionGraph::RecomputeORs( const VarSet& )

40 and RegionGraph::RecomputeOR( size_t ) protected and renamed them by changing

41 the "Recompute" into "recompute", because exposing them to the world serves no

42 purpose.

43 - RegionGraph::WriteToFile( const char* ), RegionGraph::ReadFromFile( const char * )

44 and RegionGraph::printDot( std::ostream& ) incorrectly called their respective

45 FactorGraph ancestor methods; this has been corrected by letting them throw a

46 NOT_IMPLEMENTED exception.

47 - Changed the way a RegionGraph is streamed to an std::ostream.

48 * Improved clustergraph.h/cpp:

49 - Made (previously public) members ClusterGraph::G, ClusterGraph::vars and

50 ClusterGraph::clusters private and added ClusterGraph::bipGraph(),

51 ClusterGraph::vars() and ClusterGraph::clusters() methods which offer

52 read-only access to these members.

53 - Deprecated ClusterGraph::toVector()

54 - Added ClusterGraph::nrVars() method

55 - Renamed ClusterGraph::size() method into ClusterGraph::nrClusters()

56 - Added ClusterGraph::var( size_t ) method

57 - Added ClusterGraph::cluster( size_t ) method

58 * Improved factorgraph.h/cpp:

59 - FactorGraph::clamped() now contains a delta factor for the clamped variable

60 - Renamed FactorGraph::Cliques() into FactorGraph::maximalFactorDomains()

61 - Added FactorGraph::MarkovGraph()

62 - Fixed bug in FactorGraph::clone()

63 - FactorGraph::findVars( const VarSet& ) now returns a SmallSet<size_t>

64 and its argument now has a const-qualifier (which fixes a small bug).

65 - Made (previously public) member FactorGraph::G private and added the

66 FactorGraph::bipGraph() method, which offers read-only access to it.

67 - Deprecated the iterator interface:

68 o FactorGraph::iterator typedef

69 o FactorGraph::const_iterator typedef

70 o FactorGraph::begin() members

71 o FactorGraph::end() members

72 - Deprecated FactorGraph::factor(size_t) which offered write access to a factor

73 because using this functionality in the descendant RegionGraph is dangerous,

74 as the outer regions are not automatically recomputed.

75 * Improved factor.h/cpp:

76 - Fixed bug in min( const TFactor<T> &, const TFactor<T> & )

77 - Fixed bug in max( const TFactor<T> &, const TFactor<T> & )

78 - Added TFactor<T>::takeAbs()

79 - Added TFactor<T>::takeExp()

80 - Added TFactor<T>::takeLog( bool )

81 - Added TFactor<T>::operator-() const

82 - Added TFactor<T>::sumAbs() const

83 - Added TFactor<T>::operator==( const TFactor<T> &y )

84 - Renamed TFactor<T>::states() into TFactor<T>::nrStates()

85 - Added TFactor<T>::get(size_t) and TFactor<T>::set(size_t,T) operators;

86 get() is equivalent to "operator[](size_t) const" and set() should

87 be used instead of the non-const operator[], which has been deprecated

88 * Improved prob.h/cpp:

89 - Deprecated TProb::TProb( TIterator begin, TIterator end, size_t sizeHint=0 )

90 constructor: the sizeHint argument no longer defaults to 0

91 - Deprecated TProb::accumulate( T init, binOp op1, unOp op2 );

92 instead, TProb::accumulateSum( T init, unOp op ) and

93 TProb::accumulateMax( T init, unOp op, bool minimize ) should be used.

94 - Deprecated TProb::NormType and TProb::DistType;

95 ProbNormType and ProbDistType should be used instead.

96 - Added TProb<T>::operator==( const TProb<T> &q )

97 - TProb<T>::accumulate() now also applies op2 to init

98 - Fixed bug by renaming TProb<T>::operator<=() to TProb<T>::operator<()

99 - TProb<T>& operator/= (T x) now yields 0 when dividing by 0

100 - Changed format of TProb<T> when streamed to an ostream

101 - Added TProb<T>::get(size_t) and TProb<T>::set(size_t,T) operators;

102 get() is equivalent to "operator[](size_t) const" and set() should

103 be used instead of the non-const operator[], which has been deprecated

104 - Added TProb<T>::resize(size_t)

105 * Improved index.h/cpp:

106 - Added multifor::reset()

107 * Improved properties.h/cpp:

108 - Renamed PropertySet::Set() -> PropertySet::set()

109 - Renamed PropertySet::Get() -> PropertySet::get()

110 - Renamed PropertySet::GetAs<T>() -> PropertySet::getAs<T>()

111 - Renamed PropertySet::ConvertTo<T>() -> PropertySet::convertTo<T>()

112 - Added PropertySet::size()

113 - Added PropertySet::clear()

114 - Added PropertySet::erase()

115 - Fixed bug in PropertySet::setAsString<T>()

116 * Improved util.h/cpp:

117 - Fixed a bug in rnd_seed()

118 - Removed max( const std::vector<Real> &v )

119 * Improved weightedgraph.h/cpp:

120 - Renamed MaxSpanningTreePrims into MaxSpanningTree

121 - Renamed MinSpanningTreePrims into MinSpanningTree

122 - Added option to MaxSpanningTree and MinSpanningTree for

123 choosing between Prim's algorithm and Kruskal's algorithm

124 - Better error checking in RootedTree constructor

125 - The vertices in DEdge and UEdge are now named "first" and "second"

126 for compatibility with a std::pair<size_t,size_t>

127 - Added GraphEL::GraphEL( const GraphAL& G ) constructor

128 * Improved bipgraph.h/cpp:

129 - Fixed bug in BipartiteGraph::eraseNode1()

130 - Fixed bug in BipartiteGraph::eraseNode2()

131 - Fixed bug in BipartiteGraph::isTree()

132 - Added BipartiteGraph::hasEdge()

133 - Added BipartiteGraph::findNb1()

134 - Added BipartiteGraph::findNb2()

135 - BipartiteGraph::delta1() and BipartiteGraph::delta2() now

136 return a SmallSet<size_t> instead of a vector<size_t>

137 - Added BipartiteGraph::operator==( const BipartiteGraph& )

138 - Added BipartiteGraph( size_t nr1, size_t nr2 ) constructor

139 - Added operator<<( std::ostream&, const BipartiteGraph& )

140 * Improved graph.h/cpp:

141 - Fixed bug in GraphAL::nrEdges()

142 - Fixed bug in GraphAL::addEdge()

143 - Fixed bug in GraphAL::isTree()

144 - Fixed bug in GraphAL::eraseNode()

145 - Fixed bug in GraphAL::printDot()

146 - Fixed bug in createGraphGrid3D()

147 - Fixed bug in createGraphRegular()

148 - Added GraphAL::hasEdge(size_t,size_t)

149 - Added GraphAL::operator==( const GraphAL& )

150 - Added operator<<( std::ostream&, const GraphAL& )

151 * Improved smallset.h/cpp:

152 - The sizeHint argument of the iterator constructor

153 SmallSet::SmallSet( TIterator begin, TIterator end, size_t sizeHint=0 )

154 no longer has a default value in order to avoid confusion with the

155 SmallSet::SmallSet( const T &t1, const T &t2 )

156 constructor.

157 - Added SmallSet::insert( const T& t ) method

158 * Removed RandomDRegularGraph(), please use createGraphRegular() instead

159 * Compressed Makefile

160 * Added unit tests for var, smallset, varset, graph, bipgraph,

161 weightedgraph, enum, util, exceptions, properties, index, prob,

162 factor, factorgraph, clustergraph, regiongraph, daialg, alldai

163 * Added unit testing framework

164 * Added initialization of TRWBP weights by sampling spanning trees

165 * Cleaned up MR code:

166 - rewrote response propagation implementation with help of BBP

167 - now uses GraphAL to represent the Markov graph

168 - miscellaneous smaller cleanups

169 * Fixed bug in BBPCostFunction::operator=() which prevented the desired

170 assignment from happening

171 * [Stefano Pellegrini] Fixed bug in BP[logdomain=1,inference=MAXPROD]

172 * Removed deprecated functionality

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

176 libDAI-0.2.4 (2010-02-11)

177 -------------------------

179 New features:

180 * Implemented Tree-Reweighted BP

181 * [Frederik Eaton] Implemented Fractional Belief Propagation

183 Miscellaneous improvements:

184 * Improved documentation

185 * [Frederik Eaton] Added constructors for BBPCostFunction

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

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

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

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

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

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

192 marginals calculated by the algorithm.

193 * Strengthened convergence criteria of various algorithms

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

195 similar to (but simpler than) BipartiteGraph

196 * Added some functionality to create various standard factors

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

198 * Added examples example_sprinkler_gibbs and example_sprinkler_em

199 * Implemented various heuristics for choosing a variable elimination sequence

200 in JTree

201 * Added BETHE method for GBP/HAK cluster choice

202 * Made alias support official part of the library

204 Build system:

205 * Moved platform independent build options into Makefile.ALL

206 * Windows platform now needs Boost 1.37 or higher

208 Code cleanup:

209 * Cleaned up utils/createfg and tests/testdai

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

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

213 * Removed obsolete/deprecated stuff

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

215 * Renamed some functions of BipartiteGraph:

216 add1() -> addNode1()

217 erase1() -> eraseNode1()

218 nr1() -> nrNodes1()

219 add2() -> addNode2()

220 erase2() -> eraseNode2()

221 nr2() -> nrNodes2()

222 * Renamed some functions in ClusterGraph:

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

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

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

226 * Changed interface of one RegionGraph constructor

227 * Renamed "Clamped BP" into "Conditioned BP"

229 Bug fixes:

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

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

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

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

234 and using log-domain updates

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

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

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

240 libDAI-0.2.3 (2009-11-16)

241 -------------------------

243 New features:

244 * Complete doxygen documentation (although more detailed documentation still

245 has to be written)

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

247 Expectation Maximization

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

249 octave interfaces

250 * Added Max-Product functionality to JTree

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

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

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

255 Code cleanup:

256 * Updated copyright headers

257 * Cleaned up error handling by introducing the DAI_THROWE macro

258 * Introduced DAI_DEBASSERT macro to abbreviate a common pattern

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

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

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

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

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

265 Miscellaneous improvements:

266 * BipartiteGraph:

267 - Added eraseEdge( size_t n1, size_t n2 )

268 - [Frederik Eaton] Improved documentation of Neighbor

269 * TProb<T>:

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

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

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

273 - [Frederik Eaton] Added setUniform()

274 - [Frederik Eaton] Added sumAbs()

275 - [Frederik Eaton] Added argmax()

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

277 * TFactor<T>:

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

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

280 which reorders variables to canonical ordering before storing the table

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

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

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

284 * State:

285 - [Giuseppe Passino] Added prefix ++ operator

286 * Permute:

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

288 * FactorGraph:

289 - [Frederik Eaton] Added clampVar()

290 - [Frederik Eaton] Added clampFactor()

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

292 * PropertySet:

293 - Added keys(), for getting all keys

294 - [Frederik Eaton] Added default constructor

295 - [Frederik Eaton] Added constructor from string

296 * InfAlg:

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

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

299 * ExactInf:

300 - Added calcMarginal(const VarSet &)

301 * HAK:

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

303 * BP:

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

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

306 * JTree:

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

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

309 * MatLab interface:

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

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

312 (only for BP and JTree)

313 * README is now created automatically from doxygen documentation

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

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

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

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

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

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

320 alias substitutions

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

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

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

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

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

326 variables with the same labels

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

328 * Exception objects now remember their error code

329 * Examples:

330 - Moved example.cpp to examples/

331 - Added examples/example_bipgraph.cpp

332 - Added examples/example_varset.cpp

333 - Added examples/example_sprinkler.cpp

334 - Added examples/example_permute.cpp

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

337 Build system:

338 * Improved Makefile:

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

340 - Macros DAI_VERSION and DAI_DATE have been introduced,

341 in order to store this information in a central place

342 - Introduced CCNODEBUGFLAGS in Makefile

343 - Switched Makefile.win to GNU Make syntax

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

345 * Compatibility:

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

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

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

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

351 * Var:

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

353 * VarSet:

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

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

356 * Permute:

357 - Renamed convert_linear_index into convertLinearIndex

358 * TProb<>:

359 - Replaced log0() by log(true)

360 - Replaced takeLog0() by takeLog(true)

361 - Removed hasNonPositives()

362 - Renamed minVal() to min()

363 - Renamed maxVal() to max()

364 - Renamed totalSum() to sum()

365 * TFactor<>:

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

367 - Removed divided_by, use operator/ instead

368 - Removed divide, use operator/= instead

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

370 - Renamed minVal() to min()

371 - Renamed maxVal() to max()

372 - Renamed totalSum() to sum()

373 * FactorGraph:

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

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

376 * RegionGraph:

377 - Renamed Check_Counting_Numbers into checkCountingNumbers

378 - Renamed Calc_Counting_Numbers into calcCountingNumbers

379 * Miscellaneous:

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

381 - Replaced UEdgeVec by Graph

382 - Replaced DEdgeVec by new RootedTree class

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

384 - Merged calcPairBeliefsNew() into calcPairBeliefs()

385 - Removed calcMarginal2ndO()

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

387 - Removed class Diffs

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

389 BipartiteGraph and FactorGraph (which will be obsoleted soon)

391 Bug fixes:

392 * Fixed reversal of min and max in

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

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

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

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

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

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

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

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

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

402 for reporting this)

405 libDAI-0.2.2 (2008-09-30)

406 -------------------------

408 New features:

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

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

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

412 * Added ExactInf class for brute force exact inference.

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

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

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

416 of a double is too small.

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

418 * Improved documentation.

420 Improved architecture:

421 * Added Exceptions framework.

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

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

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

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

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

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

428 made easy by using boost::foreach.

429 * Added conditional compilation of inference methods.

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

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

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

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

434 specialization with T = Var.

435 * Improved ClusterGraph implementation, yielding significant speedups

436 for the JunctionTree algorithm on large factorgraphs.

438 Code cleanup:

439 * Moved everything into namespace "dai".

440 * Renamed DEBUG to DAI_DEBUG to avoid conflicts.

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

442 * Removed utils/remove_short_loops and matlab/remove_short_loops.

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

444 * Improved index.h:

445 - Renamed Index -> IndexFor

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

447 25% speedup of testregression

448 - Replaced multind by Permute

449 - Added MultiFor

450 - Added State

451 * New funcstionality of factor.h.

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

453 inference algorithm, because the Properties framework was not as

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

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

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

457 entangled) code.

458 * Removed x2x.

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

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

462 Miscellaneous improvements:

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

464 GCC under cygwin.

465 * Contributions by Peter Gober:

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

467 * Misc contributions by Giuseppe Passino:

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

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

470 - changed #ifndefs to GNU style;

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

472 - dai::TProb:

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

474 o implementation of some methods via STL algorithms;

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

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

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

478 * Misc contributions by Christian Wojek:

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

480 and variables;

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

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

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

484 normtype is now Prob::NORMPROB by default.

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

487 Interface changes:

488 * VarSet::

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

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

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

492 - removed bool operator||

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

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

495 * FactorGraph::

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

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

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

499 - vars() -> vars

500 - factors() -> factors

501 - removed MakeFactorCavity(size_t)

502 - removed ExactMarginal(const VarSet &)

503 - removed ExactlogZ()

504 - removed updatedFactor(size_t)

505 - removed _normtype and NormType()

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

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

508 - undoProb(size_t) -> restoreFactor(size_t)

509 - saveProb(size_t) -> backupFactor(size_t)

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

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

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

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

514 - removed hasNegatives()

515 * RegionGraph::

516 - nr_ORs() -> nrORs()

517 - nr_IRs() -> nrIRs()

518 - ORs() -> ORs

519 - IRs() -> IRs

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

521 * Renamed Index -> IndexFor

522 * Diffs:

523 - max() -> maxDiff()

524 - max_size() -> maxSize()

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

526 * Factor::

527 - max() -> maxVal()

528 - part_sum() -> partSum()

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

530 * VarSet::operator&&

531 * Properties -> PropertySet

534 libDAI-0.2.1 (2008-05-26)

535 -------------------------

537 Bugfix release.

538 * added missing cstdio header in util.h

539 * fixed Properties in MR_CLAMPING_* and MR_EXACT_*

540 * added description of the factor graph fileformat

541 * improved Makefile

544 libDAI-0.2.0 (2006-11-30)

545 -------------------------

547 First public release.

550 0.1.5 (2006-11-30)

551 ------------------

553 Regressions

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

556 - EXACT method does not work anymore.

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

558 costs involved; inner loops should be optimized.

560 General framework

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

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

564 functions to forward functionality from either FactorGraph or RegionGraph

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

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

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

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

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

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

571 (make FactorGraph part of InfAlg).

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

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

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

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

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

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

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

579 saveProbs/undoProbs can give a significant speed increase.

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

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

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

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

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

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

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

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

588 command line (test) interface.

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

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

591 amount of code for handling enum parameters.

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

593 work for all approximate inference methods.

595 Bugfixes

597 - Fixed GBP free energy.

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

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

600 the logical NOT of what they should return).

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

602 - Fixed bug in utils/create_dreg_fg:

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

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

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

606 that consists of one outer region only.

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

608 - Fixed MaxDiffs flow (except for MR).

610 New functionality

612 - HAK supports several default cluster choices:

613 minimal (only factors)

614 delta (Markov blankets)

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

616 Only the maximal clusters are used as outer clusters.

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

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

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

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

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

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

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

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

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

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

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

628 It supports different initialization methods (the original RESPPROP,

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

630 (FULL and LINEAR).

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

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

633 marginals.

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

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

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

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

638 random factor graphs.

639 - Wrote utility to visualize factor graphs using graphviz.

640 (it uses the BOOST Program Options library)

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

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

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

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

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

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

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

648 - Added Martijn's x2x

650 Improvements of existing code

652 - Reimplemented RegionGraph and descendants: a RegionGraph ISA FactorGraph

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

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

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

656 outer regions from the factors.

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

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

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

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

661 timing and convergence criteria.

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

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

664 hopefully this will give more accurate approximations.

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

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

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

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

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

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

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

672 marginal functions to approximate cavity marginals.

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

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

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

676 arguments, randomize(), RemoveFirstOrderInteractions) and similar

677 operations to Prob

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

679 (tests/test is done).

680 - Renamed some FactorGraph methods:

681 nr_vars -> nrVars

682 nr_factors -> nrFactors

683 varind -> findVar

684 factorind -> findFactor

685 makeFacCavity -> makeFactorCavity

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

687 - Implemented RandomDRegularGraph

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

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

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

691 disconnected factor graphs).

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

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

694 - Removed calcCavityDist and calcCavityDist2ndO

695 - No longer depends on GSL.

696 - Increased portability by combining platform dependant utility functions

697 in util.{h,cpp}.

698 - Wrote *.m files providing help

700 Testing framework

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

703 functionality from the command line.

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

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

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

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

708 errors, relative logZ error and MaxDiff().

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

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

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

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

713 allow for easy visualization of the results using PyX.

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

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

716 regression testing).

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

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

719 results stored in tests/testfast.out

721 Miscellaneous

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

724 - Experimental MATLAB code added for StarEP approximation on cavity

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

726 - Renamed JunctionTree to JTree.

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

728 - Improved README

731 revision 252

732 ------------

734 Functionality

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

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

737 RegionGraph.

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

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

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

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

742 and when not.

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

744 it does not automatically merge factors anymore.

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

746 - Added MATLAB interface functions ai_readfg, ai_removeshortloops and ai_bp

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

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

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

751 Implementation / code

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

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

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

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

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

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

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

759 multiple inheritance and polymorphism.

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

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

762 that can be used by FactorGraph-based DAIAlgs.

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

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

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

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

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

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

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

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

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

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

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

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

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

776 instead of initial pancakes.

778 Minor changes

779 - Started writing DoxyGen documentation

780 - Renamed lcptab2fg.m matlab/ai_writefg.m

781 - Moved all matlab stuff to matlab/

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

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

784 - Improved testing suite.

785 - Removed logreal support.

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

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

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

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

790 - Added FactorGraph::WriteToDotFile

793 0.1.4 (2006-04-13)

794 ------------------

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

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

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

798 handle (partially) negative factors.

799 - Added test suite.

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

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

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

803 Now uses precalculated indices for optimization.

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

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

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

807 _parallel_ updates).

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

809 original single variable beliefs, for all AI methods.

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

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

812 (see ai.h).

815 0.1.3 (2006-03-22)

816 --------------------

817 - All AI methods now return maxdiff

818 - ai.cpp:

819 o Now returns maxdiffinner and maxdiffouter

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

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

822 - bp.cpp:

823 o New CavityDist2ndO which estimates 2nd order cavity interactions

824 - Makefile:

825 o Bugfix: removed dependencies on algwim.*

828 0.1.2 (2006-02-28)

829 --------------------

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

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

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

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

834 the output arguments Q, Q0 of ai).

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

838 0.1.1 (2006-02-28)

839 --------------------

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

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

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

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

844 of BipGraph checks for the existence of short loops.

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

846 description in the help).

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

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

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

852 0.1.0 (2006-02-28)

853 --------------------

854 First version worthy of a version number.