Live data from Hacker News

Comparing Clustering Algorithms

nbviewer.jupyter.org

21–30 of 41 posts

Re: Comparing Clustering Algorithms

#21

Cool. I have not looked into the *DBSCAN methods, yet. This post makes me think I should.

Then you should also have a look at OPTICS, which was one of the first density based clustering algo's https://en.wikipedia.org/wiki/OPTICS_algorithm and http://stackoverflow.com/questions/5515675/python-implementa...

Re: Comparing Clustering Algorithms

#22

I wrote an article about mean-shift a while back if anyone is interested in more details about it - https://spin.atomicobject.com/2015/05/26/mean-shift-clusteri... Some comments on K-Means - one large limitation of K-Means is that it assumes spherical shaped clusters. It will fail terribly for any other cluster shape. It's interesting that the author compared results on the same data set for the different algorithms.…

I agree that on some level more data sets would be nice, but I felt that it cluttered and obscured the exposition. Instead I used the one synthetic dataset, but crafted in to have various properties (noise, cluster shape, variable density, non-standard distributions) that will confound many different clustering approaches ... it is meant to be the "hard" case that with all the difficulties and confounding factors rol…

Cool, I think you did a great job. Do you have run time data for each algorithm on that data set?

Re: Comparing Clustering Algorithms

#24

how about t-SNE for clustering? https://lvdmaaten.github.io/tsne/

The t-SNE algorithm isn't a clustering algorithm, but a nonlinear embedding. Clustering algorithms assigns a label (or no label) to each point in the data set. Instead, the t-SNE finds low dimensional coordinates for each point such that nearby points in the original data are nearby in the lower dimensional representation.

That being said, I've seen the t-SNE used as a preprocessing step prior to clustering, as in ACCENSE[1].

[1]: http://www.cellaccense.com/

Re: Comparing Clustering Algorithms

#27
These all look like clustering based on a 2d space, but does anyone know methods to tackle clustering on a network?

Is it just a matter of tweaking the definition of density / distance to the number of hops, or is it a different problem entirely? I can see how with 0 or 1 hops the data would be a very smushed distribution, versus 2d distance is much more rich and spread out.

Re: Comparing Clustering Algorithms

#28

Earlier quoted context omitted.

I agree that on some level more data sets would be nice, but I felt that it cluttered and obscured the exposition. Instead I used the one synthetic dataset, but crafted in to have various properties (noise, cluster shape, variable density, non-standard distributions) that will confound many different clustering approaches ... it is meant to be the "hard" case that with all the difficulties and confounding factors rol…

Cool, I think you did a great job. Do you have run time data for each algorithm on that data set?

It's included in the upper left corner of the plots. To be fair, these are for the sklearn implementations, some of which are excellent, but I can't speak for the performance of all of them.

Re: Comparing Clustering Algorithms

#29

These all look like clustering based on a 2d space, but does anyone know methods to tackle clustering on a network? Is it just a matter of tweaking the definition of density / distance to the number of hops, or is it a different problem entirely? I can see how with 0 or 1 hops the data would be a very smushed distribution, versus 2d distance is much more rich and spread out.

Clustering algorithms generally only need a distance metric. Here 2d space is used for illustration just because it is easy to visualize.

For n-dimensional space, geometric distance is often (but not always) used, but you can just use # of hops instead of that.

Re: Comparing Clustering Algorithms

#30
post #3

As someone intrested in the subject but with 0 insight or knowledge, would these algorithms be a good match for short text clustering? For example identifying identical products in a price comparison app based on their similar but not identical title/name and possibly other attributes.

In addition to everyone suggesting the classic n-gram approaches, now it is rather easy to use a word2vec (google it) representation of the words instead - obtain a mapping between words and an array of x numbers (either by finding a pretrained word2vec model on internet or training one on texts from your special domain), and then just run clustering on those numbers instead.
Post reply on HN