next | previous | forward | backward | up | top | index | toc | Macaulay2 website
PhylogeneticTrees :: phyloToricRandom

phyloToricRandom -- compute a random invariant of a group-based phylogenetic model



This function computes a random invariant of a group-based phylogenetic tree model using the toric fiber product structure.

With equal probability the algorithm decides to return a linear, quadratic, or higher degree binomial. It then selects one of these at random (but uniformity is not guaranteed).

This is a much more efficient way to produce a single generator than listing all of them, which is useful for Monte Carlo random walk algorithms.

i1 : phyloToricRandom(4,{{0,1}},CFNmodel)

o1 = - q       q        + q       q
        0,0,1,1 1,1,0,0    0,0,0,0 1,1,1,1

o1 : QQ[q       , q       , q       , q       , q       , q       , q       , q       ]
         0,0,0,0   0,0,1,1   0,1,0,1   0,1,1,0   1,0,0,1   1,0,1,0   1,1,0,0   1,1,1,1


We currently do not guarantee a uniform distribution on the generators, even after the choice of linear, quadratic or higher degree.

See also

Ways to use phyloToricRandom :

For the programmer

The object phyloToricRandom is a method function with options.