## 4 Application to Gaussian Graphical Models
### G-Wishart Prior for General Graphs  
In contrast with the previous section, we now broaden the scope of examples and consider general, non-decomposable graphs. For the conditional general graph \(G\), a popular choice for the prior is the G-Wishart prior on \(\Omega\), \(\text{GW}(\delta,\Lambda)\), which has the following density,  
\[f(\Omega\mid G)\propto\left|\Omega\right|^{(\delta-2)/2}e^{-\text{tr}(\Omega \Lambda)/2}. \tag{12}\]  
Here, \(\Omega\), \(\Lambda\) are \(p\times p\) positive definite matrices, and \(\delta>2\). While the density expression is similar to that of the HIW density, the tractability of the normalizing constant is no longer assumed. The normalizing constant that we wish to compute is of the form  
\[C_{G}(\delta,\Lambda)=2^{\frac{1}{2}p\delta+\left|E\right|}\cdot I_{G}((\delta -2)/2,\Lambda), \tag{13}\]  
where \(I_{G}(\delta,\Lambda)=\int_{S^{p}_{-\infty}}|\Omega|^{\delta}\exp(-\text{tr}( \Omega\Lambda))\,d\Omega\). Here, \(d\Omega=\prod_{i=1}^{p}d\omega_{ii}\cdot\prod_{i<j,(i,j)\in E}d\omega_{ij}\). G-Wishart-Induced Cholesky Factor Density  
We first establish some of the notations relevant to the GW density. For \(G=(V,E)\), define \(\mathcal{V}=\{(i,j):i\leq j\text{ where }i=j,i\in V\text{ or }(i,j)\in E\}\) and \(\mathcal{W}=\{(i,j):i,j\in V,i\leq j\}\). Then, let \(\bar{\mathcal{V}}=\mathcal{W}\setminus\mathcal{V}\), and \(A_{p\times p}=(a_{ij})\), where \(a_{ij}=0\) if \((i,j)\in\mathcal{V}\) or if \(i=j\), and \(a_{ij}=1\) otherwise. Set \(k_{i}\) to be the number of \(1\)'s in the \(i\)-th column of \(A\). Proceeding in a similar fashion as in the HIW example, we take the Cholesky decomposition of \(\Omega=\phi^{\prime}\phi\) and \(\Lambda=(T^{\prime}T)^{-1}\), where \(T=(t_{ij})_{1\leq i\leq j\leq p}\). We make an additional change of variable \(\zeta=\phi T^{-1}\). The Jacobian of the first transformation \(\Omega\to\phi\) is identical to the one given in Section 4.1, and the determinant of the Jacobian of the second transformation \(\phi\to\zeta\) is given by \(\prod_{i=1}^{p}t_{ii}^{k_{i}+1}\). Putting this all together, we can rewrite the normalizing constant as an integral over the free variables of \(\zeta=(\zeta_{ij})_{1\leq i\leq j\leq p}\),  
\[C_{G}(\delta,\Lambda)=2^{p}\prod_{i=1}^{p}(t_{ii}^{2})^{(\delta +b_{i}-1)/2}\int\exp\left(-\frac{1}{2}\sum_{(i,j)\in\mathcal{V}}\zeta_{ij}^{2} \right)\prod_{i=1}^{p}(\zeta_{ii}^{2})^{(\delta+v_{i}-1)/2}\exp\left(-\frac{1} {2}\sum_{i=1}^{p}\zeta_{ii}^{2}\right)\] \[\times\exp\left(-\frac{1}{2}\sum_{(i,j)\in\mathcal{V},j\
eq j} \zeta_{ij}^{2}\right)\prod_{i=1}^{p}d\zeta_{ii}\prod_{(i,j)\in\mathcal{V},j \
eq j}d\zeta_{ij}, \tag{14}\]  
where \(b_{i}=v_{i}+k_{i}+1\), \(v_{i}=\left|\text{ne}(i)\cap\{i+1,\ldots,p\}\right|\), and \(\text{ne}(i)=\{j\in V:(i,j)\in E\}\). Taking the logarithm of the integrand above, we can write the following expression for \(\Psi(\zeta)\),  
\[\Psi(\zeta)=C+\sum_{i=1}^{p}(\delta+v_{i}-1)\log\zeta_{ii}-\frac{1}{2}\sum_{i= 1}^{p}\zeta_{ii}^{2}-\frac{1}{2}\sum_{(i,j)\in\mathcal{V}}\zeta_{ij}^{2}- \frac{1}{2}\sum_{(i,j)\in\mathcal{V},j\
eq j}\zeta_{ij}^{2}, \tag{15}\]  
where \(C=p\log(2)+\sum_{i=1}^{p}(\delta+b_{i}-1)\log t_{ii}\). Another key difference between the GW and HIW setups is how the non-free elements interact with the objective function \(\Psi\). In the case of decomposable \(G\), the Cholesky factor \(\phi\) observes the same sparsity pattern as the adjacency matrix of \(G\). This simplifies the evaluation of \(\Psi\), as \(\Psi\) can then be evaluated over the nonzero elements of \(\phi\). However, in the case of non-decomposable \(G\), the sparsity in \(G\) is not necessarily reflected in the Cholesky factors. Therefore, \(\Psi\) has nonzero contribution from the non-free elements, denoted as \(\zeta_{ij},(i,j)\in\mathcal{V}\).