neighbor.density {dissUtils} | R Documentation |
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.
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
## The function is currently defined as
function (neigh.dists, D, k, N)
{
radius <- unit.hypersphere.volume(D)
return(k/(N * radius * neigh.dists))
}