Skip to content

Giravan Newman

Divisive hierarchical clustering based on the notion of

edge betweenness: - Number of shortest paths passing through the edge

Girvan-Newman Algorithm: - Undirected unweighted networks - Repeat until no edges are left: - Calculate betweenness of edges

- Remove the edge with the highest betweenness (if two or more edges tie for highest score, remove all of them)
  • Connected components are communities

  • Gives a hierarchical decomposition of the network

截屏2020-10-15 下午8.03.06.png

Betweeness

  • BFS Starting from the node you want to start
from typing import List

class Node:
    def __init__(self, value):
        self.connections: List[Node] = []
        self.value = value
        self.distance = 0

3