bw.nn | R Documentation |
This function finds the bandwidth for an ultrametric based on the tropical distance of the nearest point. The function provides the bandwidth input to trop.KDE and was originally used in the KDETrees package.
bw.nn(x, prop = 0.2, tol = 1e-06)
x |
matrix; dissimilarity matrix between points in a data set |
prop |
proportion of observations that defines neighborhood of a point |
tol |
tolerance for zero bandwidth check |
a vector of bandwidths for each tree (row) in x
Ruriko Yoshida ryoshida@nps.edu
Weyenberg, G., Huggins, P., Schardl, C., Howe, D. K., & Yoshida, R. (2014). kdetrees: Nonparametric Estimation of Phylogenetic Tree Distributions. In Bioinformatics.
https://github.com/grady/kdetrees/blob/master/R/bw.R
T1<-Sim_Trees15
T2<-Sim_Trees25
D <- rbind(T1, T2[1,])
M <- pw.trop.dist(D, D)
bw.nn(M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.