Bayesian network structure score (source code)

= Bayesian network structure score
{c}
{title2=$p(G\mid\mathcal D)$}

For observations $\mathcal D$ and graph $G$, <Bayes theorem> gives $p(G\mid\mathcal D)\propto\pi(G)\int p(\mathcal D\mid\theta_G,G)\pi(\theta_G\mid G)\,d\theta_G$. Here $\pi(G)$ is the graph <prior distribution> and $\theta_G$ the local distribution <statistical parameters>. The integral is <Bayesian model evidence>; it averages over <nuisance parameters> with a proper <statistical parameter> <prior distribution>. For <independent> complete observations, the node-factorized <likelihood function> and <independence> of local <statistical parameter> <prior distributions> make the evidence factor over nodes; suitable <conjugate priors> can make the local integrals analytic. With missing node observations, integrating out unobserved values can couple the local parameters, so <independence> of local <prior distributions> alone does not guarantee this factorization. Proper priors and coherent hyperparameters matter for comparing different graphs.