Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Incorrect average degree on directed graphs #767

sheymann opened this Issue · 3 comments

4 participants


Report on Gephi Facebook group using this file:

"Hi, I have a query about the average degree calculation in Gephi. I'm currently doing a Social and Economic Network Analysis course and we have been given a file as part of an assignment (attached). When calculating the average degree I get 3.889, but according to the course staff the correct figure is 7.77. I've run this file both directed and undirected and both times I get 3.889. Looking at the data in the lab when the file is opened as a directed graph, all nodes have a degree ranging from 6 to 10 and I'm failing to see how we can get an average degree of less than 4.

The course is recommending Pajek as the tool we should use. It seems Pajek users are getting 7.77."

@eduramiba eduramiba was assigned
@sheymann sheymann referenced this issue from a commit
@sheymann sheymann fix bug #767 240f4a5

Just to let the users know, when is this fix going to be included in the executable versions avail. from


Hi, based on Sheymann, the bug has been fixed. The same file has been executed on Gephi & Pajek but apparently I still got the same result as reported. Looking forward to get any response. Many thanks.


Just to add on this:
In some cases, Gephi misses the directed aspect of the network and computes metrics as if for an undirected network. In the case of average degree, a directed network where all edges are bidrectional (A->B and B->A, B->C and C->B, etc.) will get an incorrect value of half the correct one.

That can happen for instance when the network comes from an imported .net file.

To restore the correct behavior, just create manually (ie, through the icon "create edge" in the overview) an undirected edge. This causes Gephi to become aware of the directionality of the network, and henceforth the computations for the average degree will be correct for this network. Just delete the undirected edge and you'll get correct values for your network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.