bnlearn's documentation!
========================

*bnlearn* is for learning the graphical structure of Bayesian networks in Python! What benefits does bnlearn offer over other bayesian analysis implementations?

* Build on top of the pgmpy library
* Contains the most-wanted bayesian pipelines
* Simple and intuitive
* Focus on structure learning, parameter learning and inference.

`Step-by-step guide for structure learning <https://towardsdatascience.com/a-step-by-step-guide-in-detecting-causal-relationships-using-bayesian-structure-learning-in-python-c20c6b31cee5>`_
`Step-by-step guide for knowledge-driven models <https://towardsdatascience.com/a-step-by-step-guide-in-detecting-causal-relationships-using-bayesian-structure-learning-in-python-c20c6b31cee5>`_


Content
========

.. toctree::
   :maxdepth: 2
   :caption: Quickstart

   Quickstart


.. toctree::
   :maxdepth: 2
   :caption: Introduction

   Introduction
   Installation


.. toctree::
  :maxdepth: 2
  :caption: Structure learning

  Structure learning


.. toctree::
  :maxdepth: 2
  :caption: Parameter learning

  Parameter learning


.. toctree::
  :maxdepth: 2
  :caption: Inference

  Inference


.. toctree::
  :maxdepth: 2
  :caption:   Predict

  Predict


.. toctree::
  :maxdepth: 2
  :caption: Other functionalities

  Create DAG
  Sampling and datasets
  whitelist_blacklist
  topological_sort
  saving and loading

.. toctree::
  :maxdepth: 2
  :caption: Examples

  Examples
  UseCases

.. toctree::
  :maxdepth: 2
  :caption: Plot

  Plot

.. toctree::
  :maxdepth: 1
  :caption: API References


  bnlearn.structure_learning
  bnlearn.parameter_learning
  bnlearn.inference
  bnlearn.bnlearn


References
------------------------------
* `Probabilistic Graphical Models using pgmpy <https://conference.scipy.org/proceedings/scipy2015/pdfs/ankur_ankan.pdf>`_
* `Causality, Pearl, 2009, 2nd Editing <http://ftp.cs.ucla.edu/pub/stat_ser/r350.pdf>`_
* `If correlation doesn't imply causation, then what does? from Michael Nielsen <http://www.michaelnielsen.org/ddi/if-correlation-doesnt-imply-causation-then-what-does/>`_
* `Lecture notes from Jonas Peters <http://www.math.ku.dk/~peters/jonas_files/scriptChapter1-4.pdf>`_
* `Elements of Causal Inference <http://www.math.ku.dk/~peters/jonas_files/bookDRAFT5-online-2017-02-27.pdf>`_
* `Causality slides <http://mlss.tuebingen.mpg.de/2017/speaker_slides/Causality.pdf>`_

Related Packages
------------------------------
* `Causal graphical models <https://github.com/ijmbarr/causalgraphicalmodels>`_
* `Causality <https://github.com/akelleh/causality>`_
* `Causal Inference <https://github.com/laurencium/causalinference>`_


Source code and issue tracker
------------------------------

Available on Github, `erdogant/bnlearn <https://github.com/erdogant/bnlearn/>`_.
Please report bugs, issues and feature extensions there.


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
