Coder Social home page Coder Social logo

HDBSCAN parameters about dbscan HOT 2 CLOSED

mhahsler avatar mhahsler commented on May 24, 2024
HDBSCAN parameters

from dbscan.

Comments (2)

peekxc avatar peekxc commented on May 24, 2024

Hi @kbarylyuk,

Regarding the min_samples parameter:

The approach taken by the package right now is a bit different from SciKit's. In short, you are right, there are two 'min*' parameters associated with HDBSCAN. The first is minPts, which determines how the HDBSCAN hierarchy is made, i.e.

x <- as.matrix(iris[, 1:4])
cl <- dbscan::hdbscan(x, minPts = 5L)

The second, what you refer too as min_samples, is set by default to whatever the initial setting of minPts was, i.e. min_samples = minPts, however it can be given an alternative setting as follows:

dbscan::extractFOSC(cl$hc, minPts = <min_cluster_size>)

I recommend perusing the members of the cl object returned by HDBSCAN. It contains several members which may be useful. One of which is the hc element, which is an hclust object representing the HDBSCAN hierarchy. This hierarchy is what is parsed through via extractFOSC to determine the resulting clustering.

Regarding the cluster selection option:

As of right now, hdbscan only supports optimizing the excess of mass functional. I'm not sure what other cluster selection methods are in the Python one. However, it's worth noting that the hc element that was used above is indeed a valid hclust object. hclust objects natively have conversions to dendrogram objects as well, so, any tools you find that work off of either hclust or dendrogram objects in the R world you can use w/ HDBSCAN as well. For example, you can cut the tree like you might do with other hierarchical clustering algorithms (see ?stats::cutree), you can use the few cluster validation indices built for hierarchical clustering, and you can do a lot of dendrogram enhancements and statistics with packages like dendextend

from dbscan.

kbarylyuk avatar kbarylyuk commented on May 24, 2024

Hi @peekxc,

thank you very much for these suggestions. I'll explore these options and see if they allow me to do what I want.

from dbscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.