Debian Codegraph @

texmf-dist/doc/latex/tikz-bayesnet/README.rst

raw
1 BayesNet
2 ========
3
4 TikZ library for drawing Bayesian networks, graphical models and (directed) factor
5 graphs in LaTeX.
6
7 Contents
8 --------
9
10 Provides the following node styles:
11
12 * :code:`latent`
13
14 * :code:`obs`
15
16 * :code:`det`
17
18 * :code:`const`
19
20 * :code:`factor`
21
22 * :code:`plate`
23
24 * :code:`gate`
25
26 Provides the following commands (note that any of the arguments can be
27 empty):
28
29 * :code:`\factor [options] {name} {caption} {inputs} {outputs}`
30
31 * :code:`\plate [options] {name} {fitlist} {caption}`
32
33 * :code:`\gate [options] {name} {fitlist} {inputs}`
34
35 * :code:`\vgate {name} {fitlist-left} {caption-left} {fitlist-right}
36 {caption-right} {inputs}`
37
38 * :code:`\hgate {name} {fitlist-top} {caption-top} {fitlist-bottom}
39 {caption-bottom} {inputs}`
40
41 * :code:`\edge [options] {inputs} {outputs}`
42
43 * :code:`\factoredge [options] {inputs} {factors} {outputs}`
44
45 Usage
46 -----
47
48 Install the package by copying tikzlibrarybayesnet.code.tex to your
49 LaTeX system or copy the file into projects that are using it. To use
50 the library in your LaTeX file
51
52 .. code-block:: python
53
54 \usepackage{tikz}
55 \usetikzlibrary{bayesnet}
56
57 Compile the LaTeX example:
58
59 .. code-block:: none
60
61 pdflatex example.tex
62
63 and see the resulting PDF file example.pdf.
64
65 Example
66 -------
67
68 .. figure:: http://i.imgur.com/CzNyk.png
69 :align: center
70 :alt: Bayesian network.
71
72 PCA model as a Bayesian network and a directed factor graph.
73
74 .. figure:: http://i.imgur.com/CBZqL.png
75 :align: center
76 :alt: Citation influence model
77
78 Directed factor graph of the citation influence model.
79
80
81 Related projects
82 ----------------
83
84 This library is derived from a technical report "Directed Factor Graph
85 Notation for Generative Models" and the accompanying TikZ macros by
86 Laura Dietz 2010 (http://people.cs.umass.edu/~dietz/).
87
88 GraphViz (http://www.graphviz.org/) is a more general open source
89 graph visualization software. It uses DOT file format to describe the
90 structure of the graph. The DOT file can be converted to LaTeX using
91 :code:`dot2tex` (http://www.fauskes.net/code/dot2tex/).
92
93 UAI (http://graphmod.ics.uci.edu/uai08/FileFormat) is a simple text
94 file format to describe Markov networks. The UAI file format can be
95 converted to DOT file format using :code:`uai2dot`
96 (https://github.com/drewfrank/uai2dot).
97
98 License
99 -------
100
101 | Copyright (C) 2010-2011 Laura Dietz
102 | Copyright (C) 2012 Jaakko Luttinen [email protected]
103
104 This work may be distributed and/or modified under the conditions of
105 the LaTeX Project Public License, either version 1.3 of this license
106 or (at your option) any later version. The license is in the file
107 LICENSE_LPPL and the latest version of this license is in
108 http://www.latex-project.org/lppl.txt and version 1.3 or later is part
109 of all distributions of LaTeX version 2005/12/01 or later.
110
111 This work is free software: you can redistribute it and/or modify it
112 under the terms of the GNU General Public License as published by the
113 Free Software Foundation, either version 3 of the License, or (at your
114 option) any later version. This work is distributed in the hope that
115 it will be useful, but WITHOUT ANY WARRANTY; without even the implied
116 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
117 the GNU General Public License for more details. See the license in
118 the file LICENSE_GPL or visit <http://www.gnu.org/licenses/>.
119
120