Learn R Programming

kdetrees (version 0.1.3)

bw.nn: nearest-neighbor adaptive bandwidth selection

Description

For each row in pairwise distance matrix find the distance to the closest prop fraction of trees.

Usage

bw.nn(x, prop = 0.2, tol = 1e-06)

Arguments

x
pairwise distance matrix
prop
fraction of data to define the local neighborhood
tol
tolerance for zero-bandwidth check

Value

  • a vector of bandwidths for each tree (row) in x

Examples

Run this code
dm <- as.matrix(dist.diss(apicomplexa[1:20]))
bw.nn(dm)

Run the code above in your browser using DataLab