<commit_before>Title: Intercausal Reasoning in Bayesian Networks
Date: 2017-03-13 15:14
Author: <NAME>
Category: Uncategorized
Slug: intercausal-reasoning-in-bayesian-networks
Status: published

The work for this post is contained in the following [Jupyter notebook](http://nbviewer.jupyter.org/github/cavaunpeu/intercausal-reasoning/blob/master/intercausal_reasoning.ipynb). Below is a brief introduction of what's inside.

I'm currently taking a course on [probabilistic graphical models](https://www.coursera.org/learn/probabilistic-graphical-models) in which we algebraically compute conditional probability estimates for simple Bayesian networks given ground-truth probabilities of the component parts. Since this is rather unrealistic in the real world, I sought to explore the same question with observational data instead.

This work contains an example of intercausal reasoning in Bayesian networks. Given the following toy network, where both the "president being in town" and a "car accident on the highway" exert influence over whether a traffic jam occurs, we'd like to compute the following probabilities: 

$$P(\text{Accident = 1}\ |\ \text{Traffic = 1})$$

$$P(\text{Accident = 1}\ |\ \text{Traffic = 1}, \text{President = 1})$$

Answering these questions with given, ground-truth probabilities is an exercise in the factorization of graphical models. Conversely, using observational data asks us to first estimate these probabilities themselves - as distributions, ideally - before pressing forward with the final plug-and-play.

Once more, this work can be found in the notebook linked above. The accompanying repository can be found [here](https://github.com/cavaunpeu/intercausal-reasoning).

![simple bayesian network]({filename}/figures/simple_bayesian_network.png)

Your thoughts are welcome. Many thanks for reading.<commit_msg>add intercausal-reasoning-in-bayesian-networks as jupyter notebook<commit_after>Title: Intercausal Reasoning in Bayesian Networks
Date: 2017-03-13 15:14
Author: <NAME>
Category: Uncategorized
Slug: intercausal-reasoning-in-bayesian-networks
Status: published

{% notebook downloads/notebooks/intercausal_reasoning.ipynb cells[3:] %}
{'fraction_non_alphanumeric': 0.07875457875457875, 'fraction_numerical': 0.013736263736263736, 'mean_word_length': 5.681957186544342, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5394842', 'n_tokens_mistral': 653, 'n_tokens_neox': 579, 'n_words': 231}