Exercise

# Comparing community algorithms

There are many ways that you can find a community in a graph (you can read more about them here). Unfortunately, different community detection algorithms will give different results, and the best algorithm to choose depends on some of the properties of your graph Yang et. al..

You can compare the resulting communities using`compare()`

. This returns a score ("the variance in information"), which counts whether or not any two vertices are members of the same community. A lower score means that the two community structures are more similar.

You can see if two vertices are in the same community using `membership()`

. If the vertices have the same membership number, then they are in the same community.

Instructions 1/3

**undefined XP**

- Use
`as.undirected()`

to make the graph undirected. - Use three clustering algorithms on
`retweet_graph_undir`

to identify communities:`cluster_fast_greedy()`

,`cluster_infomap()`

, and`cluster_louvain()`

.