Several changes by Giuseppe Passino
[libdai.git] / README
1 libDAI - A free/open source C++ library for Discrete Approximate Inference methods
2 ==================================================================================
3
4 v 0.2.2 - September 30, 2008
5
6
7 Copyright (C) 2006-2008 Joris Mooij [joris dot mooij at tuebingen dot mpg dot de]
8 Radboud University Nijmegen, The Netherlands /
9 Max Planck Institute for Biological Cybernetics, Germany
10
11 with contributions from:
12
13 Martijn Leisink
14 Giuseppe Passino
15 Christian Wojek
16 Claudio Lima
17 Bastian Wemmenhove
18 Jiuxiang Hu
19 Peter Gober
20
21
22 ----------------------------------------------------------------------------------
23 This file is part of libDAI.
24
25 libDAI is free software; you can redistribute it and/or modify
26 it under the terms of the GNU General Public License as published by
27 the Free Software Foundation; either version 2 of the License, or
28 (at your option) any later version.
29
30 libDAI is distributed in the hope that it will be useful,
31 but WITHOUT ANY WARRANTY; without even the implied warranty of
32 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 GNU General Public License for more details.
34
35 You should have received a copy of the GNU General Public License
36 along with libDAI; if not, write to the Free Software
37 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
38 ----------------------------------------------------------------------------------
39
40
41 SCIENTISTS: please be aware that the fact that this program is released as Free
42 Software does not excuse you from scientific propriety, which obligates you to
43 give appropriate credit! If you write a scientific paper describing research
44 that made substantive use of this program, it is your moral obligation as a
45 scientist to (a) mention the fashion in which this software was used, including
46 the version number, with a citation to the literature, to allow replication;
47 (b) mention this software in the Acknowledgements section. The appropriate
48 citation is:
49
50 J. M. Mooij (2008) "libDAI 0.2.2: A free/open source C++ library for Discrete
51 Approximate Inference methods", http://mloss.org/software/view/77/.
52
53 Moreover, as a personal note, I would appreciate it if you would email me with
54 citations of papers referencing this work so I can mention them to my funding
55 agent and tenure committee.
56
57
58 About libDAI
59 ------------
60 libDAI is a free/open source C++ library (licensed under GPL) that provides
61 implementations of various (approximate) inference methods for discrete
62 graphical models. libDAI supports arbitrary factor graphs with discrete
63 variables; this includes discrete Markov Random Fields and Bayesian Networks.
64
65 The library is targeted at researchers; to be able to use the library, a good
66 understanding of graphical models is needed.
67
68
69 Limitations
70 -----------
71 libDAI is not intended to be a complete package for approximate inference.
72 Instead, it should be considered as an "inference engine", providing various
73 inference methods. In particular, it contains no GUI, currently only supports
74 its own file format for input and output (although support for standard file
75 formats may be added later), and provides very limited visualization
76 functionalities.
77
78
79 Features
80 --------
81 Currently, libDAI supports the following (approximate) inference methods:
82
83 * Exact inference by brute force enumeration;
84 * Exact inference by junction-tree methods;
85 * Mean Field;
86 * Loopy Belief Propagation [KFL01];
87 * Tree Expectation Propagation [MiQ04];
88 * Generalized Belief Propagation [YFW05];
89 * Double-loop GBP [HAK03];
90 * Various variants of Loop Corrected Belief Propagation [MoK07, MoR05].
91
92
93 Why C++?
94 --------
95 Because libDAI is implemented in C++, it is very fast compared with
96 implementations in MatLab (a factor 1000 faster is not uncommon). libDAI does
97 provide a MatLab interface for easy integration with MatLab.
98
99
100 Releases
101 --------
102 Releases can be obtained from http://mloss.org/software/view/77/
103 License: GNU Public License v2 (or higher).
104
105 libDAI-0.2 December 1, 2006
106 libDAI-0.2.1 May 26, 2008
107 libDAI-0.2.2 September 30, 2008
108
109
110 Acknowledgments
111 ---------------
112 This work is part of the Interactive Collaborative Information Systems (ICIS)
113 project, supported by the Dutch Ministry of Economic Affairs, grant BSIK03024.
114 I would like to thank Martijn Leisink for providing the basis on which libDAI has been built.
115
116
117 Documentation
118 -------------
119 Some doxygen documentation is available. Install doxygen and use "make doc" to build the
120 documentation. If the documentation is not clear enough, feel free to send me an email
121 (or even better, to improve the documentation!).
122
123 A description of the factor graph (.fg) file format can be found in the file FILEFORMAT.
124
125
126 Compatibility
127 -------------
128 The code has been developed under Debian GNU/Linux with the GCC compiler suite.
129 libDAI compiles successfully with g++ versions 4.1, 4.2 and 4.3.
130
131 libDAI has also been successfully compiled with MS Visual Studio 2008 under Windows
132 (but not all build targets are supported yet).
133
134
135 Quick start (linux/cygwin)
136 --------------------------
137 You need:
138 - a recent version of gcc (at least version 3.4)
139 - GNU make
140 - doxygen
141 - graphviz
142 - recent boost C++ libraries (at least version 1.34)
143
144 On Debian/Ubuntu, you can easily install all these packages with a single command:
145 "apt-get install g++ make doxygen libboost-dev libboost-graph-dev libboost-program-options-dev"
146 (root permissions needed).
147
148 To build the source, edit the Makefile and adapt it to your local setup. Then, run
149
150 make
151
152 If the build was successful, you can test the example program:
153
154 ./example tests/alarm.fg
155
156 or the more elaborate test program:
157
158 tests/testdai --aliases tests/aliases.conf --filename tests/alarm.fg --methods JTREE_HUGIN BP_SEQMAX
159
160
161 Quick start (windows)
162 ---------------------
163 You need:
164 - A recent version of MicroSoft Visual Studio (2008 works)
165 - recent boost C++ libraries (version 1.34 or higher)
166
167 To build the source, edit the Makefile and adapt it to your local setup. Then, run (from the command line)
168
169 nmake -f Makefile.win
170
171 If the build was successful, you can test the example program:
172
173 example tests\alarm.fg
174
175 or the more elaborate test program:
176
177 tests\testdai --aliases tests\aliases.conf --filename tests\alarm.fg --methods JTREE_HUGIN BP_SEQMAX