Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gephi and NetworkX return different average clustering coefficient for same graph

I calculated average clustering coefficient using both Gephi and NetworkX. For the same graph NetworkX gave 0.2399 while Gephi gave 0.644.

  1. Why is it different ?
  2. How do NetworkX and Gephi calculate average clustering coefficient ?
  3. In case of disconnected components specifically; how do NetworkX and Gephi calculate the coefficient ?
like image 870
sridhar Avatar asked Jan 29 '17 22:01

sridhar


People also ask

How does Networkx calculate clustering coefficient?

The clustering coefficient for the graph is the average, C = 1 n ∑ v ∈ G c v , where is the number of nodes in G .

What is average clustering coefficient in Gephi?

The clustering coefficient (Watts-Strogatz), when applied to a single node, is a measure of how complete the neighborhood of a node is. When applied to an entire network, it is the average clustering coefficient over all of the nodes in the network.

What does average clustering coefficient tell you?

The clustering coefficients measure the average probability that two neighbors of a vertex are themselves neighbors (a measure of the density of triangles in a network).

How do you find the clustering coefficient of a graph?

The global clustering coefficient is the number of closed triplets (or 3 x triangles) over the total number of triplets (both open and closed): CC = 3 × number of triangles number of triplets = number of closed triplets number of triplets . 〈C〉 = E[C]=1/3 for the above graph.


1 Answers

just to mention that networkx's average_clustering has a parameter named count_zeros. average_clustering documentation

Its default value is True which means it will take zero-clustering node into account. You can set it to False and see if it returns the same value as Gephi.

like image 151
Tianmin Lyu Avatar answered Sep 28 '22 17:09

Tianmin Lyu