Advanced Topics · Machine Learning

Bayesian Networks

Watch lectures

Bayesian Networks

1. Idea

Directed acyclic graph factorizes joint distribution into local parent-child tables — compact + interpretable:

p(x1...xd)=product over i of p(xi∣parents(xi))p(x₁...x_{d}) = \text{product over } i \text{ of } p(x_{i} | \text{parents}(x_{i}))

Absent edge = conditional independence.

2. Example

Rain → WetGrass ← Sprinkler
p(Rain, Sprinkler, Wet) = p(Rain) p(Sprinkler) p(Wet | Rain, Sprinkler)

Knowing Wet couples Rain/Sprinkler (explaining away): if Sprinkler on, Rain less likely.

3. Independence (d-separation, intuition)

  • Chain A→B→CA → B → C: AA independent of CC given BB.
  • Fork A←B→CA ← B → C: AA independent of CC given BB.
  • Collider A→B←CA → B ← C: AA independent of CC until BB observed, then dependent.

4. Inference + Learning

Exact (variable elimination) for small nets; approximate (sampling, variational) for large. Learn tables by counting (ML/MAP with Dirichlet smoothing); learn graph by scored search (harder).

5. Exam Points

  • Write factorization + draw 3-node net — 5-7 marks, very frequent.
  • Explaining away + d-separation cases — 5 marks, frequent.
  • Parameter counting (tables size) — 3 marks, frequent.
Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Machine Learning modules