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