Learn R Programming

TML (version 2.3.0)

tropical.KDE: Tropical Kernel Density Estimation of Phylogenetic Trees

Description

This function calculates a non-parametric density estimate of a tree over the space of phylogenetic trees on m leaves. It mimics classical kernel density estimation by using a Gaussian kernel in conjunction with tropical distance.

Usage

tropical.KDE(D, n, sigma, h = 2)

Value

list containing center point and radius of minimum enclosing ball of P

Arguments

D

matrix of phylogenetic tree observations as ultrametrics

n

number of leaves for each tree

sigma

bandwidth parameter based on tropical distance

h

height of the tree

Author

Ruriko Yoshida ryoshida@nps.edu

References

Weyenberg, G., Huggins, P., Schardl, C., Howe, D. K., & Yoshida, R. (2014). kdetrees: Nonparametric Estimation of Phylogenetic Tree Distributions. In Bioinformatics.

Yoshida, Ruriko, David Barnhill, Keiji Miura and Daniel Howe (2022). Tropical Density Estimation of Phylogenetic Trees.

Examples

Run this code
# \donttest{
T1<-Sim_Trees15
T2<-Sim_Trees25
D <- rbind(T1, T2[1,])
T <- dim(D)[1]
X <- 1:T
M <- pw.trop.dist(D, D)
sigma <- bw.nn(M)
P_5 <- tropical.KDE(D, n, sigma, h = 2)
Q5 <- P_5[T]
# }

Run the code above in your browser using DataLab