Skip to content

m00nlight/density-peak-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

density-peak-cluster

An R implementation of the paper "Clustering by fast search and find of density peaks" in Science Magazine 2014.

How to experiment

First, you need to install R programming environment. Follow the instruction of the offical site.

Then, in the project directory, you can type R to start an R interpreter. Type in the following command to load the program.

> source("./density-peak-cluster.r")

In the dataset-test directory, there are some data sets to use. You can just use the run function to experiment. For example the following command will use the spirtal.txt dataset.

> run("./dataset-test/spirtal.txt")

It will generate an image output of the result. The left part is the scatter plot of the density and delta described in the paper, and the top-right part is the gold standard, and the bottom-right part is the result of the algorithm.

Some results

spirtal result

spirtal

flame result

flame

r15 result

r15

aggregation result

aggregation

For some tests, it try to combine to weakly connect components in the dataset. I will try to find better way to solve the problem. Any suggestion or improvement of the code are welcome.

For more details about the algorithm, please refer to paper itself.

License

This is an open source software distributed under the BSD license. See LICENSE for details.

About

Density Peak cluster algorithm of in R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages