phylostar / cybayes Goto Github PK
View Code? Open in Web Editor NEWBayesian Phylogenetics with Cython
License: GNU General Public License v2.0
Bayesian Phylogenetics with Cython
License: GNU General Public License v2.0
Cache scores like in the gamma less system to fasten inference.
Node Slider move has to be implemented. Just select a node, its parent and parent's parent and change the branch length using a multiplier move and reinsert the parent randomly.
The scaling function is not executed right when calculating the ML function.
Add nexus reader.
Add ascertainment bias correction for binary characters.
to prevent errors when caching.
Will need faster matrix multiplications since the profiling suggests that most of the time is spent in computing matrix multiplications which are part of numpy dot function. Is there any way to optimize it @Anaphory.
I tried tests with cython's blas wrapper with dgemm function. But the timing results are not better than np.dot function. Any feedback is welcome.
Tests using binary data of Rama et al.(2018) for five language families.
Added Extended SPR for a controlled version of random SPR. Follow Yang's description.
Multiple aligned datasets with preferably SCA/ASJP encoding might be useful for testing the phylogenies. Of course, we are interested in checking how the trees emerge from the runs. @Anaphory has some datasets that have small alphabet size to test.
@LinguList Shall I assign this to you?
Clock trees implementation is something to think about.
Drummond et al. 2002 (http://www.genetics.org/content/161/3/1307.long) is the best paper that has MCMC moves close to what I implemented in this package.
How to generate a time tree is the question? As of now the trees are rooted. However, a time tree would have all the tips at same level. That will introduce extra complications that might need to be handled. Any ideas on how to sample a starting tree are welcome.
Need to write tests for testing where cybayes fail. More cleaning of code to increase efficiency might be required. May be, @xrotwang can suggest some ways to test the code.
Change README to accommodate the change of input file format.
@robertostling I am using numpy's dot multiplication to multiply a KxK matrix with a KxS matrix. K is in the range of 2 to 40 whereas S is in the range of 500 to 10000. The dot product is the main bottleneck since most of the calls are here:
Line 25 in a1dc917
I am directly calling the numpy dot within Cython. Do you think directly calling BLAS function matrix multiplication would be faster? If I can bring the cost down then it would be great since direct calling might be faster.
A Gamma Dirichlet prior from Rannala et al. (2012) for better tree lengths than the exponential prior being used now.
A Leaning chain option should be implemented and tested.
A guided SPR based on cluster similarity. Choose a branch randomly. Select the parent and child edge also. Select the edge whose subtree has the highest similarity to the branch to be pruned and regrafted. This is is more guided than the current version where the parent is attached and tested.
The next step is to implement MCMCMC for sampling trees. The process essentially consists of a cold chain and 2<= n <= N hot chains whose exponent is set to 1/(1+alpha*(n-1)) and alpha is 0.1.
Briefly, there will be an exchange of states between two chains once in a while following an acceptance ratio given here:
http://bamm-project.org/mc3.html
The question is how to exchange states. Essentially, this is parallel simulated annealing. @robertostling any thoughts about this. I don't have much experience with MPI programming. May be there is simpler way to achieve this.
Initialize Gamma site rates alpha to 1 always to prevent underflow errors. Already done in cogbayes branch. Fix for all the branches.
Implement a subtree scaler that scales branch lengths upto root.
Add a tree multiplier move.
Compute PSRF to evaluate the serial tempering convergence. Another way is to compute the tree distance and then check convergence.
Add a random seed option
Add uniform prior as in Ronquist et al. (2012). Does not seem difficult to implement.
Add minimum and maximum branch lengths sampling code to nodeslider and branch scaler move.
Implementing rescaling with caching will improve the speed of the simulated tempering chains.
Use masked array to calculate likelihood.
Add autotuning of proposal distribution hyperparameters
Node slider proposal ratio needs to be fixed. As of now I added a slider edge to keep things working.
Settings review and close. Especially the rate vs. scale settings.
Rescaling for caching for NNI has to be done.
Many files are repetitions that need to be thrown out or moved.
Add a fixed population size coalescent tree prior with independent gamma branch rates.
mvDualSlider has low acceptance rate. This has to be fixed.
when printing to a file.
Site rates alpha parameter sampling has to be checked to see if it works well.
Print the counter of the temperature states visited for future analysis.
Change starting tree to greedy stepwise addition parsimony tree.
ML estimation of frequencies should be fixed.
Gamma site rates implement.
Add a MRCA conditioned Birth-Death Prior
Have to add a GTR implementation.
Add code for working with user specified tree
@robertostling Does it make sense to anneal the likelihood during burnin? I googled around a bit. But did not find much literature. My idea is to anneal the likelihood from low temperature to high temperature during burnin and then sample sample at high temperature for the rest of the chain.
An implementation of Covarion model would be essential for further experiments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.