Giter Club home page Giter Club logo

curvature's Introduction

curvature

This is the text and code for the paper Ricci-Ollivier curvature of the rooted phylogenetic Subtree-Prune-Regraft graph by Chris Whidden and Erick Matsen.

Software dependencies

In addition to Sage, we depend on the following python packages:

  • scons
  • matplotlib
  • seaborn
  • pandas

Running analyses

Edit the SConstruct file in analysis according to needs, and then type scons on the command line in the analysis directory to run the analyses.

Additional plotting and regression is performed in the IPython notebook analysis/plot-and-regress.ipynb.

Handy commands

git pull --recurse-submodules
git submodule update --recursive

curvature's People

Contributors

cwhidden avatar gavryushkin avatar matsen avatar mlandis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curvature's Issues

Show that single SPR moves of a tree of fixed size have zero curvature as tree size gets large.

This one I'm definitely ready to conjecture about, and I think we can prove it as follows.

Say t_n = (n,(n-1,(n-2,....(1,2)))) and s_n = (1,(n,(n-1,(n-2,....(2,3))))). I conjecture that kappa(t_n, s_n) goes to zero as n goes to infinity.

This is of course saying that W_1(t_n, s_n) goes to 1 as n goes to infinity. The only way this could happen is that if a nonzero fraction of neighbors of t_n were also neighbors of s_n. But almost all SPR moves are independent of the move differentiating t_n and s_n, so that can't be true.

7-taxa graphs

How are these coming? At the very least I would like to include the 7-taxa curvature distribution to prove that we did compute them and to show that curvatures can be negative.

I don't think 7-taxa access times are necessary.

What sorts of patterns are there in the curvatures?

I have just pushed SVGs to the repo. If you want tooltipped versions just run distribution.Rmd through RStudio (one click of a button).

4 taxa

ricci4

5 taxa

ricci5

6 taxa

ricci6

  • Will the smallest curvature for a given distance always be achieved by a tangle with a comb tree? Note that for 5 taxa, the smallest for distance 2 is achieved by a pair consisting of a comb and a tree of topology (,((,),(,))).
  • As the number of leaves goes to infinity, do all curvatures go to zero?

The tidy

After getting the FOCS paper submitted, I'd like to

  • decide about case convention for GAP code

Positive coefficient for T_2?

T_1 typically (always?) has the lower degree right? Then that matches our observation that the curvature decreases with large degree changes.

variable                     coefficient    p-value 
----------                   -------------  ---------
 $T_1$ degree                 12.15          2.7e-55 
 $T_2$ degree                 6.629          4.3e-21 
 $d_{\operatorname{rSPR}}$    41.19          1.1e-44 

Are we going to use rooted or unrooted trees?

Of course, for the time being we are interested in unrooted trees underlying things, but we don't necessarily have the technology to look at SPRs on unrooted trees.

Say we are interested in finding a rooting such that there is a one to one correspondence between uSPR and rSPR moves for a shortest path between two given trees. How far apart can those trees be? I think that you've said before that the answer is one.

Integrate in code that generates the graphs

@cwhidden -- can you point me to the code that generates matrix_7 and and matrix_nni_7, etc? Note that SAGE is happier with big adjacency lists than it is with big matrices, and I think you generated those for me before. If that's correct, can you point out how it's done?

Could we avoid calculating the full k-tube around a pair of trees by considering the k-neighborhood around a tangle?

All we actually need as input into the linear program to calculate the curvature between x and y are the pairwise distances of all trees in the k-neighborhoods around x and y. There will be many duplicates of these objects in terms of tangles. Thus, does it make sense to consider methods for calculating the k-neighborhood of tangles around a given tangle, where this is defined as the tangles coming from all pairs of trees in the two k-neighborhoods?

I wonder if this symmetry could be productively incorporated into the linear program itself, or if we would just have to have lots of identical entries.

Enumerate all equivalence classes of pairs of trees and determine their sizes.

Clearly the labeling doesn't matter as such, it only matters in terms of comparing one tree to another. Thus, for example, we can interchange labels that only label cherries on both trees.

I'd like to enumerate all equivalence classes of pairs of trees and determine their sizes. This seems like something that folks looking at SPR must have done, because it's useful in that setting for sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.