Macaulay2 » Documentation
Packages » GraphicalModels :: gaussianRing(Graph)
next | previous | forward | backward | up | index | toc

gaussianRing(Graph) -- ring of Gaussian correlations of a graphical model coming from an undirected graph

Synopsis

Description

This function creates a polynomial ring with indeterminates $s_{(i,j)}$ for $1 \leq i \leq j \leq n$, where $n$ is the number of vertices in $G$, and $k_{(i,j)}$.

The $s_{(i,j)}$ indeterminates in the gaussianRing are the entries in the covariance matrix of the jointly normal random variables.

The $k_{(i,j)}$ indeterminates in the gaussianRing are the nonzero entries in the concentration matrix in the graphical model associated to the undirected graph.

i1 : G = graph({{a,b},{b,c},{c,d},{a,d}})

o1 = Graph{a => {b, d}}
           b => {a, c}
           c => {b, d}
           d => {a, c}

o1 : Graph
i2 : R = gaussianRing G

o2 = R

o2 : PolynomialRing
i3 : gens R

o3 = {k   , k   , k   , k   , k   , k   , k   , k   , s   , s   , s   , s   ,
       a,a   b,b   c,c   d,d   a,b   a,d   b,c   c,d   a,a   a,b   a,c   a,d 
     ------------------------------------------------------------------------
     s   , s   , s   , s   , s   , s   }
      b,b   b,c   b,d   c,c   c,d   d,d

o3 : List
i4 : covarianceMatrix R

o4 = | s_(a,a) s_(a,b) s_(a,c) s_(a,d) |
     | s_(a,b) s_(b,b) s_(b,c) s_(b,d) |
     | s_(a,c) s_(b,c) s_(c,c) s_(c,d) |
     | s_(a,d) s_(b,d) s_(c,d) s_(d,d) |

             4      4
o4 : Matrix R  <-- R
i5 : undirectedEdgesMatrix R

o5 = | k_(a,a) k_(a,b) 0       k_(a,d) |
     | k_(a,b) k_(b,b) k_(b,c) 0       |
     | 0       k_(b,c) k_(c,c) k_(c,d) |
     | k_(a,d) 0       k_(c,d) k_(d,d) |

             4      4
o5 : Matrix R  <-- R

See also

Ways to use this method: