TreeCluster icon indicating copy to clipboard operation
TreeCluster copied to clipboard

arg_max optimisation

Open boristim66 opened this issue 2 years ago • 0 comments

Hi, thank you for the wonderful program, I sucsessfully use its algorithms rewritten in C++ in my work. I would like to draw your attention to the fact that the argmax_clusters function works very inefficiently with methods "xxx_clade". Each such method, at first, calculates the required distances when traversing the tree without using the "threshold" parameter, and then the another algorithm (the same in all "xxx_clade" methods) performs clustering with this parameter. If you separate the distance calculation (one times) and clustering in cycle with "threshold" stepping of these methods in the argmax_clusters, you will get at least double/triple acceleration of this function, and when using the min_clusters_threshold_med_clade method, this acceleration is even difficult to estimate. If you find time for such optimization, users will be very grateful to you.

boristim66 avatar May 27 '22 11:05 boristim66