This package is implemented in R and investigated another option for the rho (local density) computation: mean distance to M nearest neighbors, where M is computed as some constant percentage of the number of samples N .
Step 1 read data from sample file
dataInfo = loadDataInfo("flame.txt")Step 2 plot the data distribution
plotData(dataInfo$df)Step 3 compute the local density ρ and the distance δ from points of higher density
clusterResult = densityPeakCluster(dataInfo)Step 4 draw the decision graph(a scatterplot of features δ and ρ for all points)
plotDeltaRho(clusterResult)Step 5 plot the data distribution using cluster centroids
plotData(dataInfo$df,"flame", clusterResult$peaks)Step 6 plot the SSE with the ratio of the number of samples N.
plotMLRatio(dataInfo)🎉🎉🎉
Rodriguez, A., & Laio, A. (2014). Clustering by fast search and find of density peaks. Science, 344(6191), 1492-1496. doi:10.1126/science.1242072