Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating clusters from adjacency matrix / edge list in R

I am trying to find potential clusters or groups of nodes (forum messages, in this case).

In the current data, each node (message) has been tentatively grouped together with n other messages, and that group given a name. So, we know that msg ID 1 has been seen together with msg ID 3, and 7, say.

I am currently using that information to construct an edge list (if they have been grouped together, an edge exists), and then using walktrap community to produce a dendrogram.

Are there any other ways to tease out groups or clusters, given the edge list? (I am using R, but pointers to anything would be helpful).

Thanks for your time!

like image 872
Paul Avatar asked Feb 04 '26 08:02

Paul


2 Answers

I don't know much about R, but...

This overview paper discusses graph clustering in great detail. You might also be interested in the Markov clustering (MCL) algorithm.

like image 97
Fred Foo Avatar answered Feb 06 '26 00:02

Fred Foo


For network analysis in R I recommend using igraph. Are you already using that? It allows the construction of dendrograms using different clustering methods. Then use community.to.membership() to cut the dendrogram. The MCL algorithm is not (yet) available from igraph, but it can be run from the command line pretty easily.

like image 26
micans Avatar answered Feb 05 '26 22:02

micans