Prior Sampling
Prior Sampling is the simplest approximate inference method for Bayes Nets. It estimates posterior probabilities by sampling full assignments from the joint distribution defined by the network and then counting outcomes consistent with the query.
The goal is to approximate
by generating many samples from the model.Sampling proceeds in topological order of the Bayes Net:
- For each variable , sample a value from .
- This produces a complete assignment .
All samples are treated equally. After generating samples, the posterior is estimated by relative frequencies.
Limitation: if the evidence is unlikely, most samples will be inconsistent with and therefore wasted. As a result, prior sampling can be extremely inefficient when conditioning on rare evidence.