cluster_edge_betweenness in MovieLense

When I created an adjacency matrix from the MovieLense dataset and passed it through the cluster_edge_betweenness() function I got 79 communities. And the modularity of this network is 0.89. But the problem is any detected community contains similar members. For example, let’s say community #1 has 8 members. When I look inside at these members they share the same age group, gender, and even occupation. Could anyone tell me about the problem with my community detection?

I don’t quite understand your question and why you think that it is a problem that communities contain similar members. Note that most of us are not familiar with MovieLense. You should give sufficient context.

However, I wanted to point out that at this moment cluster_edge_betweenness() is not suitable for working with weighted graphs, and should give a warning if you try to use it on one. You do not mention if you use a weighted graph. If yes, do not use this function.

1 Like

Thank you for your prompt reply!
The dataset is big, but I will give the most important part of it. It contains user age group(1~5), gender, and occupation. I made an adjacency matrix comparing each individual. For instance, if user A has the same attributes with user B then I give 1 to
Adj_{a,b} . So, it will be a binary sparse matrix. Then I convert it to graph object using following function:

graph_from_adjacency_matrix(adj_mat_users,
                                 mode = "undirected",
                                 weighted = NULL,
                                 diag = TRUE,
                                 add.colnames = NULL)

Then, I applied cluster_edge_betweenness() function.
Totally, 79 communities were detected. However, members in one community shares the same attributes. Could somebody clearify it?

You present this as a “problem”, but I do not understand why. You say that you insert an edge between individuals who have the same or similar attributes. Then indeed communities will contain individuals who have similar attributes.

You did not explain what you are trying to achieve. One would assume that indeed it is detecting groups of similar individuals.

1 Like