Comprehensive TeX Archive Network

Direc­tory tex-archive/graphics/pgf/contrib/tikz-bayesnet


TikZ library for drawing Bayesian networks, graphical models and (directed) factor
graphs in LaTeX.


Provides the following node styles:

* :code:`latent`

* :code:`obs`

* :code:`det`

* :code:`const`

* :code:`factor`

* :code:`plate`

* :code:`gate`

Provides the following commands (note that any of the arguments can be

* :code:`\factor [options] {name} {caption} {inputs} {outputs}`

* :code:`\plate [options] {name} {fitlist} {caption}`

* :code:`\gate [options] {name} {fitlist} {inputs}`

* :code:`\vgate {name} {fitlist-left} {caption-left} {fitlist-right}
  {caption-right} {inputs}`

* :code:`\hgate {name} {fitlist-top} {caption-top} {fitlist-bottom}
  {caption-bottom} {inputs}`

* :code:`\edge [options] {inputs} {outputs}`

* :code:`\factoredge [options] {inputs} {factors} {outputs}`


Install the package by copying tikzlibrarybayesnet.code.tex to your
LaTeX system or copy the file into projects that are using it.  To use
the library in your LaTeX file

.. code-block:: python


Compile the LaTeX example:

.. code-block:: none

   pdflatex example.tex

and see the resulting PDF file example.pdf.


.. figure:: http://i.imgur.com/CzNyk.png
   :align: center
   :alt: Bayesian network.

   PCA model as a Bayesian network and a directed factor graph.

.. figure:: http://i.imgur.com/CBZqL.png
   :align: center
   :alt: Citation influence model

   Directed factor graph of the citation influence model.

Related projects

This library is derived from a technical report "Directed Factor Graph
Notation for Generative Models" and the accompanying TikZ macros by
Laura Dietz 2010 (http://people.cs.umass.edu/~dietz/).

GraphViz (http://www.graphviz.org/) is a more general open source
graph visualization software.  It uses DOT file format to describe the
structure of the graph.  The DOT file can be converted to LaTeX using
:code:`dot2tex` (http://www.fauskes.net/code/dot2tex/).

UAI (http://graphmod.ics.uci.edu/uai08/FileFormat) is a simple text
file format to describe Markov networks. The UAI file format can be
converted to DOT file format using :code:`uai2dot`


| Copyright (C) 2010-2011 Laura Dietz
| Copyright (C) 2012 Jaakko Luttinen jaakko.luttinen@aalto.fi

This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license
or (at your option) any later version.  The license is in the file
LICENSE_LPPL and the latest version of this license is in
http://www.latex-project.org/lppl.txt and version 1.3 or later is part
of all distributions of LaTeX version 2005/12/01 or later.

This work is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.  This work is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied
the GNU General Public License for more details.  See the license in
the file LICENSE_GPL or visit <http://www.gnu.org/licenses/>.


Name Size Date Notes
LICENSE_GPL 35147 2013-01-02 14:26
LICENSE_LPPL 19106 2013-01-02 14:26
3338 2013-01-02 14:26 ⇒ /graph­ics/pgf/con­trib/tikz-bayesnet/README.rst
README.rst 3338 2013-01-02 14:26
ex­am­ple.tex 3782 2013-01-02 14:26
model_ci­ta­tion_in­flu­ence.tex 4061 2013-01-02 14:26
model_lda.tex 1630 2013-01-02 14:26
model_pca.tex 854 2013-01-02 14:26
model_pca2.tex 1873 2013-01-02 14:26
tik­zli­brary­bayesnet.code.tex 3929 2013-01-02 14:26

Down­load the con­tents of this pack­age in one zip archive (28.0k).

tikz-bayesnet – Draw Bayesian net­works, graph­i­cal mod­els and di­rected fac­tor graphs

The pack­age pro­vides a li­brary sup­port­ing the dis­play of Bayesian net­works, graph­i­cal mod­els and (di­rected) fac­tor graphs in LaTeX.

Pack­age De­tailstikz-bayesnet
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2010 Laura Di­etz
2012 Jaakko Lut­ti­nen
Main­tainerJaakko Lut­ti­nen
Con­tained inTeX Live as tikz-bayesnet
MiKTeX as tikz-bayesnet
Topics type­set re­ports, di­a­grams, etc., of statis­tics
pack­age uses PGF-TikZ
Guest Book Sitemap Contact Contact Author