This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is just a quick translation of an ordinary Procrustes sum of squares method, as done in the R function procOPA. | |
#All credits to Dryden, I. L. (2014). shapes package. R Foundation for Statistical Computing, Vienna, Austria. Contributed package. Version 1-1.10. URL http://www.R-project.org | |
#The function are, for now, as they are. I'll be working on them in the future... | |
#Compute a matrix with ones on the main diagonal | |
#and -1/n elsewhere | |
function scaled_ones(n) | |
eye(n) - (1/n) * ones(n,n) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Fri Jun 21 10:52:11 2013 | |
@author: Giulio Valentino Dalla Riva | |
@email: gvd16@uclive.ac.nz | |
""" | |
#generate a tree list following a birth and death process | |
#the process is conditioned to N leaves (with success) | |
#the list is long rang | |
def generate_trees_bdN(birth=0.57721,death=0.130357,N=49,rang=314): |
NewerOlder