gaussianVanishingIdeal computes the ideal in $R$ of homogeneous polynomial relations on the variance-covariance parameters of a graphical model on $G$ as explained in Chapter 3.3 of ``Lectures on Algebraic Statistics'' by Drton, Sturmfels, and Sullivant.
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 : J = gaussianVanishingIdeal(R); o3 : Ideal of R |
i4 : ideal mingens J / print; 2 s s s - s s - s s s + s s s + s s s - s s s a,d b,c b,d a,c b,d a,d b,b c,d a,b b,d c,d a,c b,b d,d a,b b,c d,d 2 s s s - s s - s s s + s s s + s s s - s s s a,c a,d b,c a,c b,d a,b a,d c,c a,a b,d c,c a,b a,c c,d a,a b,c c,d |
This method works for graphs, digraphs and mixed graphs without undirected edges.
i5 : G = digraph {{a,{b,c}}, {b,{c,d}}, {c,{}}, {d,{}}} o5 = Digraph{a => {c, b}} b => {c, d} c => {} d => {} o5 : Digraph |
i6 : R = gaussianRing G o6 = R o6 : PolynomialRing |
i7 : gaussianVanishingIdeal(R) o7 = ideal (s s - s s , s s - s s , s s - s s ) b,c b,d b,b c,d a,d b,c a,b c,d a,d b,b a,b b,d o7 : Ideal of R |
i8 : H = mixedGraph(digraph {{a,{c}},{b,{c}}, {c,{d}}},bigraph {{c,d}}) o8 = MixedGraph{Bigraph => Bigraph{c => {d}}} d => {c} Digraph => Digraph{a => {c}} b => {c} c => {d} d => {} Graph => Graph{} o8 : MixedGraph |
i9 : S = gaussianRing H o9 = R o9 : PolynomialRing |
i10 : gaussianVanishingIdeal(S) o10 = ideal (s s - s s , s s - s s , s s - s s ) b,c b,d b,b c,d a,d b,c a,b c,d a,d b,b a,b b,d o10 : Ideal of R |
This method currently works on really small examples because it computes the vanishing ideal as an elimination ideal.
The object gaussianVanishingIdeal is a method function with options.