# Probabilistic Graphical Models (PGMs)
https://truetheta.io/concepts/probabilistic-graphical-models/
## Differences Between Models
| Aspect | Generative (HMM) | Discriminative (CRF) |
| ------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| Target | Joint distribution $P(x,y)$ | Conditional distribution $P(y \vert x)$ |
| Factorization | $P(x,y)=P(y)P(x \vert y)$ | $P(y \vert x)=\frac{\exp(s(y,x))}{\mathbb{Z}(x)}$ |
| Sampling | You can sample $(x,y)$ by ancestral sampling: first draw $y$, then $x \vert y$. | You cannot sample $x$ (only $y \vert x$ given an observed $x$) |