> For the complete documentation index, see [llms.txt](https://theshank.gitbook.io/ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theshank.gitbook.io/ai/probability-and-statistics-1/inference/graphical-models.md).

# Graphical Models

## Bayesian Networks

These are directed graphs, where there is directed edge between two variables which shows cause-effect relation.&#x20;

These are modeled using the conditional probability mostly.&#x20;

![Conditional Parameterization of Bayesian Graph](/files/-M8hzKvqFomJyJVk90r5)

## Markov Networks

These are undirected graphs. Which doesn't necessarily shows cause-effect but rather the connection between variables.&#x20;

Using conditional probability in case of *Undirected Graphical Models* seems erratic because there is no direction and hence no natural conditioning.

In the case of Markov Models, we want to capture the **affinity** between connected random variables.
