resampling is better for a homogeneous smoothing
Smoothens a tree intree along its longest paths.
This changes (shortens) the total length of the branch significantly.
First finds the heavier sub-branches
(thresholded by .5 to 1 value pwchild)
and puts them together to longest paths.
Then a smoothing step is applied on the branches
individually using p,
proportion smoothing (0 to 1, default .9),
and n, number of iterations (default 10).
“smooth_tree” calls
“smoothbranch”
but this sub-function can be replaced by any other one of a similar type.
Example 1:
change proportion of smoothing (p)
>> rtree = resample_tree (sample2_tree, 1);
>> smooth_tree (rtree, .5, p, 5)
Example 2:
change number of iterations (n)
>> smooth_tree (rtree, .5, .9, n)
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License