Description Usage Arguments Value References Examples
View source: R/neighbor_density.R
neighbor.density
estimates the density around a point by
accounting for the dimensionality of the space the neighbors are in,
the total number of points in the space, and how many neighbors are
found at least as close to the point as the density given.
1 | neighbor.density(neigh.dists, D, k, N)
|
neigh.dists |
a vector of distances between members of a multivariate data set and
their |
D |
the number of dimensions of the multivariate space |
k |
the number of neighbors found around each point within the
hyperspheres with radii given in |
N |
the total number of points in the data set from which the neighbors
are drawn. This may not be equal to |
a numeric vector of densities
http://en.wikipedia.org/wiki/N-sphere
1 2 3 4 5 6 | ## The function is currently defined as
function (neigh.dists, D, k, N)
{
radius <- unit.hypersphere.volume(D)
return(k/(N * radius * neigh.dists))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.