0% found this document useful (0 votes)
98 views1 page

Calculating Clustering Coefficient PDF

The document discusses calculating the clustering coefficient of graphs and nodes. The clustering coefficient measures how tightly connected the neighbors of a node are. It is calculated by taking the number of connections between a node's neighbors divided by the total possible connections between those neighbors. The document provides an example calculation for a small graph and shows averaging the individual node coefficients provides the overall graph clustering coefficient.

Uploaded by

Aman Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views1 page

Calculating Clustering Coefficient PDF

The document discusses calculating the clustering coefficient of graphs and nodes. The clustering coefficient measures how tightly connected the neighbors of a node are. It is calculated by taking the number of connections between a node's neighbors divided by the total possible connections between those neighbors. The document provides an example calculation for a small graph and shows averaging the individual node coefficients provides the overall graph clustering coefficient.

Uploaded by

Aman Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Calculating Clustering Coefficient

In graph theory, a clustering coefficient is a measure of the degree to which nodes in a graph
tend to cluster together. Evidence suggests that in most real-world networks, and in particular
social networks, nodes tend to create tightly knit groups characterized by a relatively high
density of ties; this likelihood tends to be greater than the average probability of a tie randomly
established between two nodes – Wikipedia

Clustering coefficient is a local measure. Therefore we calculate clustering coefficient of a node by using
following formula:

Here, Ki is the degree of node i and Li is the number of edges between the ki neighbors of node i.

The clustering coefficient of entire graph is average clustering coefficient of entire graph and can be
calculated as:

Example:

Consider graph shown in Figure 1. Now we calculate clustering coefficient for each node.
2(1) 2
For Node 1: K1= 2 , L1 = 1, 𝐶1 = 2(2−1)
=> 𝐶1 = 2
=> 𝐶1 = 1

2(1) 2
For Node 2: K2= 2 , L2 = 1, 𝐶2 = 2(2−1)
=> 𝐶2 = 2
=> 𝐶2 = 1

2(1) 2
For Node 3: K3= 3 , L2 = 1, 𝐶3 = => 𝐶3 = => 𝐶3 = 0.33
3(3−1) 6

2(0) 0
For Node 4: K4= 1 , L4 = 0, 𝐶4 = 1(1−1)
=> 𝐶4 = 0
=> 𝐶4 = 0

For average clustering coefficient


𝑁
1 1
〈𝐶〉 = ∑ 𝐶𝑖 => (1 + 1 + 0.33 + 0) => 0.58
𝑁 4
𝑖=1
Figure 1: Green Line is the edge of neighbors
One can verify this by executing following lines in R: for Node 1

g = graph(edges=c(1,2,1,3,2,3,3,4),directed=F)

transitivity(g, type="local", isolates = "zero")

You might also like