Skip to contents

Maximum likelihood tree search via NNI

Usage

perform_nni(
  tree_init,
  P,
  max_iter = 100,
  eps = 0.01,
  ncores = 1,
  verbose = TRUE
)

Arguments

tree_init

phylo Intial tree

P

matrix Genotype probability matrix

max_iter

integer Maximum number of iterations

eps

numeric Tolerance threshold in likelihood difference for stopping

ncores

integer Number of cores to use

verbose

logical Verbosity

Value

multiPhylo List of trees corresponding to the rearrangement steps

Examples

tree_list = perform_nni(tree_upgma, P_small)
#> Iter 2 -1615.02320811357, 0.061s
#> Iter 3 -1612.77216335478, 0.059s
#> Iter 4 -1611.12211209167, 0.059s
#> Iter 5 -1609.77582445369, 0.059s
#> Iter 6 -1608.45689338819, 0.059s
#> Iter 7 -1606.49695634113, 0.059s
#> Iter 8 -1606.49695634113, 0.059s