Skip to main content

Implementation of the Clustering by fast search and find of density peaks algorithm

Project description

Density Peak Clustering

This project implements the 'Clustering by fast search and find of density peaks' algorithm as described by Rodriguez and Laio in their paper:

Rodriguez, Alex, and Alessandro Laio. “Clustering by Fast Search and Find of Density Peaks.” Science 344, no. 6191 (June 27, 2014): 1492–96 (https://www.science.org/doi/10.1126/science.1242072).

Overview

Density Peak Clustering is a clustering algorithm that identifies cluster centers by finding dense regions in the data and assigns the remaining points based on their distance to these centers. This project provides a custom implementation of this algorithm. The original code supplied with the paper ("cluster_dp.m", Matlab) can be found in the demo folder.

Features

  • Compute local density and distance to higher density points
  • Identify cluster centers
  • Assign cluster IDs to each point
  • Determine core samples of clusters

Demo's

The demo folder holds the following files:

  1. demo_paper_figures.ipynb: Code to reproduce a selection of figures from the original paper using this python toolbox.
  2. fig1.dat: Data point coordinates of figure 1 of the paper
  3. fig2_panelB.dat: Data point coordinates of figure 2B of the paper
  4. fig2_panelC.dat: Data point coordinates of figure 2C of the paper
  5. cluster_dp.m: Original code from the authors of the paper

Installation

To use this project, directly install from PyPi:

pip install densitypeakclustering

Or, clone the repository and install manually:

git clone https://github.com/pgoltstein/densitypeakclustering.git
cd densitypeakclustering
pip install .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

densitypeakclustering-1.0.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

densitypeakclustering-1.0.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file densitypeakclustering-1.0.1.tar.gz.

File metadata

  • Download URL: densitypeakclustering-1.0.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for densitypeakclustering-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a48f49b04e9be27a8af244ca70016b7ba3d3ccec0152a2be6d3485b1df156c94
MD5 d112f693e6b02f55eeb3252e43c5cfdd
BLAKE2b-256 66edf448fdf6bf2cb7994ec16d78d6bd9cc6884901f04abb45978d35322f0a86

See more details on using hashes here.

File details

Details for the file densitypeakclustering-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for densitypeakclustering-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f5992a3855be4a6f78aa1011a53f8ecccb122aeccf8a204d9189ca3ddf4f5d7
MD5 0ca207d1ab369b3d6f8a2364a56969f3
BLAKE2b-256 b455340bc4175fe6410d0b3f1c6e0588232510d793c3ed6b6e98556d991bea62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page