cluster_leading_eigen and cluster_edge_betweenness functions

Hi, I have been working on community detection so far.
My purpose is to apply betweenness centrality and eigenvector centrality.
However, when I applied cluster_edge_betweenness and cluster_leading_eigen function they produced the same result. Even membership vectors are also identical. Then I suspected that I used functions wrongly, but when I tried with the “karate” dataset it worked well. Two functions generated different results. Could anyone explain why while I am passing my data to these functions, they are giving the same result?. Here is my data and source code:
adj_mat_users.csv (1.1 MB)

train_network <- graph_from_adjacency_matrix(adj_mat_users,
                                             mode = "undirected",
                                             weighted = NULL,
                                             diag = FALSE)

train_community_eigen <- cluster_leading_eigen(train_network)
train_community_edge <- cluster_edge_betweenness(train_network)

Why do you think they shouldn’t?

cluster_leading_eigen() does not use eigenvector centrality. I recommend reading up on how these methods work if you intend to depend on their details.

I’ll note that I downloaded your graph and all of its connected components are cliques.

1 Like

Does it use the leading eigenvector method?
I wanted to ask about the calculation of cluster_leading_eigen().
Is it possible to compute and construct communities without using this function? I mean by using other intermediate functions provided by igraph?

You can check the documentation, which has a reference to the paper describing the method: igraph R manual pages

I am not sure what you mean. There are several community detection functions provided by igraph. However, it makes no sense to do community detection on your graph, since it consists of disconnected cliques.

Yes, each of them is a complete sub-graph, by the way.