Aan de slagGa gratis aan de slag

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 usingcompare(). 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.

Deze oefening maakt deel uit van de cursus

Case Studies: Network Analysis in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Make retweet_graph undirected
retweet_graph_undir <- as_undirected(___)

# Find communities with fast greedy clustering
communities_fast_greedy <- (___

# Find communities with infomap clustering
communities_infomap <- ___

# Find communities with louvain clustering
communities_louvain <- ___
Code bewerken en uitvoeren