Learn R Programming

densityClust (version 0.3.3)

estimateDc: Estimate the distance cutoff for a specified neighbor rate

Description

This function calculates a distance cutoff value for a specific distance matrix that makes the average neighbor rate (number of points within the distance cutoff value) fall between the provided range. The authors of the algorithm suggests aiming for a neighbor rate between 1 and 2 percent, but also states that the algorithm is quite robust with regards to more extreme cases.

Usage

estimateDc(distance, neighborRateLow = 0.01, neighborRateHigh = 0.02)

Value

A numeric value giving the estimated distance cutoff value

Arguments

distance

A distance matrix

neighborRateLow

The lower bound of the neighbor rate

neighborRateHigh

The upper bound of the neighbor rate

References

Rodriguez, A., & Laio, A. (2014). Clustering by fast search and find of density peaks. Science, 344(6191), 1492-1496. doi:10.1126/science.1242072

Examples

Run this code
irisDist <- dist(iris[,1:4])
estimateDc(irisDist)

Run the code above in your browser using DataLab