A python implementation for 'Clustering by fast search and find of density peaks' in science 2014.
Python version: 3.5
- The input file should be distance metrix beteen points. If you have data of points vector,
distance.py
may be helpful. - Run
python plot.py input_filename
and you will get the decision graph (of rho and delta). - Close the graph (save it if you want) and input the density_threshold(rho) and distance_threshold(delta) according to the decision graph, two float numbers separated by a blank space.
- The cluster result will be write into file
dpcluster.txt
with two columns, points index in column 1 while cluster center in column 2 correspondingly (-1 for halo). - A graph of cluster result will be plotted meanwhile.
- jasonwbw's github repo, DensityPeakCluster
- Clustering by fast search and find of density peaks