Coloring-t-SNE icon indicating copy to clipboard operation
Coloring-t-SNE copied to clipboard

Leiden clustering

Open flying-sheep opened this issue 7 years ago • 4 comments
trafficstars

Hi! I think for what you’re doing, you might consider a community detection algorithm on the high dimensional data (or a bunch of PCAs/ICAs to spped things up).

They serve us very well in the computational biology world, much better than the primitive k-means or dbscan.

Until recently, we used louvain community detection, but the author of the python package recently published an improved version: https://github.com/vtraag/leidenalg

flying-sheep avatar Nov 22 '18 08:11 flying-sheep

Thanks! This is the best example I could find that compares them: https://jmonlong.github.io/Hippocamplus/2018/02/13/tsne-and-clustering/ (comparison is to Louvain, but I'm assuming it would be similar).

I will try to reproduce this notebook with open data and add this algorithm when I do.

In general I'm more interested in continuous "labels" than clustering because I think our eyes can pick out more detail from the continuous variation, but I'm very curious what happens here.

kylemcdonald avatar Nov 23 '18 01:11 kylemcdonald

Yup, the continuous labels things is closer to the truth than clustering when there’s a lot of continuous transitions going on.

However, in that case tSNE isn’t a good choice. You could try UMAP for such data.

flying-sheep avatar Nov 23 '18 11:11 flying-sheep

Why do you say UMAP is better for data with continuous variation than t-SNE? I have a lot of experience with both, but haven't seen or read anything to indicate this.

kylemcdonald avatar Dec 10 '18 17:12 kylemcdonald

I’m pretty surprised that you didn’t, the preservation of that kind of structure is one of its main selling points. t-SNE rips things apart, UMAP doesn’t. Here’s the first google hit for “umap vs tsne”, which says

[…] notably highlighting faster runtime and consistency, meaningful organization of cell clusters and preservation of continuums in UMAP compared to t-SNE.

flying-sheep avatar Dec 11 '18 08:12 flying-sheep