Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract clusters using OPTICS ( R package - dbscan , or alternatives )

This might be a mix of a R question and an algorithm question. The question is about both OPTICS in general and the R implementation of optics in the package "dbscan" ( https://cran.r-project.org/web/packages/dbscan/dbscan.pdf )

My main reason to move from using DBSCAN to OPTICS was that the dataset I have has variable density clusters, and they are of irregular shape. OPTICS produces a reachability plot, but for my use case the more interesting part is the extraction of clusters. There is some automatic cluster extraction described in the original paper that isn't just a single cut-point for eps. ( http://fogo.dbs.ifi.lmu.de/Publikationen/Papers/OPTICS.pdf).

So my two part qn: 1) Is there a way to use the R package in this way for the automatic extraction? 2) Is there an OPTICS implementation that supports this (python,elsewhere)?

like image 743
ednaMode Avatar asked Oct 30 '25 03:10

ednaMode


1 Answers

1) Yes! The dbscan package has a function to extract optics clusters with variable density. ?dbscan::extractXi()

extractXi extract clusters hiearchically specified in Ankerst et al (1999) based on the steepness of the reachability plot. One interpretation of the xi parameter is that it classifies clusters by change in relative cluster density. The used algorithm was originally contributed by the ELKI framework, but contains a set of fixes.

See https://cran.r-project.org/web/packages/dbscan/vignettes/dbscan.pdf for extensive description of methods and examples

like image 69
Alex Thomas Avatar answered Nov 01 '25 18:11

Alex Thomas