Macaulay2 » Documentation
Packages » Markov :: gaussIdeal
next | previous | forward | backward | up | index | toc

gaussIdeal -- correlation ideal of a Bayesian network of joint Gaussian variables

Synopsis

Description

These ideals were first written down by Seth Sullivant, in "Algebraic geometry of Gaussian Bayesian networks". The routines in this package involving Gaussian variables are all based on that paper.
i1 : R = gaussRing 5;
i2 : G = makeGraph {{2},{3},{4,5},{5},{}}

o2 = Graph{1 => set {2}   }
           2 => set {3}
           3 => set {4, 5}
           4 => set {5}
           5 => set {}

o2 : Graph
i3 : (globalMarkovStmts G)/print;
{{1, 2}, {4, 5}, {3}}
{{1}, {3, 4, 5}, {2}}
i4 : J = gaussIdeal(R,G)

o4 = ideal (- s   s    + s   s   , - s   s    + s   s   , - s   s    +
               1,5 2,4    1,4 2,5     1,5 3,4    1,4 3,5     2,5 3,4  
     ------------------------------------------------------------------------
     s   s   , s   s    - s   s   , s   s    - s   s   , s   s    - s   s   ,
      2,4 3,5   1,4 2,3    1,3 2,4   1,4 3,3    1,3 3,4   2,4 3,3    2,3 3,4 
     ------------------------------------------------------------------------
     s   s    - s   s   , s   s    - s   s   , s   s    - s   s   , -
      1,5 2,3    1,3 2,5   1,5 3,3    1,3 3,5   2,5 3,3    2,3 3,5   
     ------------------------------------------------------------------------
     s   s    + s   s   , - s   s    + s   s   , - s   s    + s   s   ,
      1,4 2,3    1,3 2,4     1,5 2,3    1,3 2,5     1,5 2,4    1,4 2,5 
     ------------------------------------------------------------------------
     s   s    - s   s   , s   s    - s   s   , s   s    - s   s   )
      1,3 2,2    1,2 2,3   1,4 2,2    1,2 2,4   1,5 2,2    1,2 2,5

o4 : Ideal of R

A list of independence statements (as for example returned by globalMarkovStmts) can be provided instead of a graph.

The ideal corresponding to a conditional independence statement {A,B,C} (where A,B,C, are disjoint lists of integers in the range 1..n (n is the number of random variables) is the #C+1 x #C+1 minors of the submatrix of the generic symmetric matrix M = (s_(i,j)), whose rows are in A union C, and whose columns are in B union C. In general, this does not need to be a prime ideal.
i5 : I = gaussIdeal(R,{{{1,2},{4,5},{3}}, {{1},{2},{3,4,5}}})

                                                                      
o5 = ideal (- s   s    + s   s   , - s   s    + s   s   , - s   s    +
               1,5 2,4    1,4 2,5     1,5 3,4    1,4 3,5     2,5 3,4  
     ------------------------------------------------------------------------
                                                                             
     s   s   , s   s    - s   s   , s   s    - s   s   , s   s    - s   s   ,
      2,4 3,5   1,4 2,3    1,3 2,4   1,4 3,3    1,3 3,4   2,4 3,3    2,3 3,4 
     ------------------------------------------------------------------------
                                                                   
     s   s    - s   s   , s   s    - s   s   , s   s    - s   s   ,
      1,5 2,3    1,3 2,5   1,5 3,3    1,3 3,5   2,5 3,3    2,3 3,5 
     ------------------------------------------------------------------------
              2                                                    2    
     s   s   s    - s   s   s   s    - s   s   s   s    + s   s   s    -
      1,5 2,5 3,4    1,5 2,4 3,4 3,5    1,4 2,5 3,4 3,5    1,4 2,4 3,5  
     ------------------------------------------------------------------------
                                                                   2        
     s   s   s   s    + s   s   s   s    + s   s   s   s    - s   s   s    +
      1,5 2,5 3,3 4,4    1,5 2,3 3,5 4,4    1,3 2,5 3,5 4,4    1,2 3,5 4,4  
     ------------------------------------------------------------------------
                                                             
     s   s   s   s    + s   s   s   s    - s   s   s   s    -
      1,5 2,4 3,3 4,5    1,4 2,5 3,3 4,5    1,5 2,3 3,4 4,5  
     ------------------------------------------------------------------------
                                                             
     s   s   s   s    - s   s   s   s    - s   s   s   s    +
      1,3 2,5 3,4 4,5    1,4 2,3 3,5 4,5    1,3 2,4 3,5 4,5  
     ------------------------------------------------------------------------
                                  2              2                       
     2s   s   s   s    + s   s   s    - s   s   s    - s   s   s   s    +
       1,2 3,4 3,5 4,5    1,3 2,3 4,5    1,2 3,3 4,5    1,4 2,4 3,3 5,5  
     ------------------------------------------------------------------------
                                                2
     s   s   s   s    + s   s   s   s    - s   s   s    - s   s   s   s    +
      1,4 2,3 3,4 5,5    1,3 2,4 3,4 5,5    1,2 3,4 5,5    1,3 2,3 4,4 5,5  
     ------------------------------------------------------------------------
     s   s   s   s   )
      1,2 3,3 4,4 5,5

o5 : Ideal of R
i6 : codim I

o6 = 5

See also

Ways to use gaussIdeal :

For the programmer

The object gaussIdeal is a method function.