density calculation for directed graphs

11 views
Skip to first unread message

Uwe Serdült

unread,
Dec 11, 2020, 12:50:35 AM12/11/20
to visone-users
Dear Visone team,
I am using visone 2.18 for an undergrad class in which students have to calculate density by hand but could also use visone to do the job. However, when importing the directed graph attached and calculating density you get a value of .5833 in visone but also showing 30 present edges (as there should be). The size of the graph is n=9. 
You can get 0.5833 for density in a directed graph of size 9 with 42 edges present but there are clearly only 30.
Can you reproduce and check, please?
Best wishes,
Uwe

Ex1a_1.csv

Müller Julian

unread,
Jan 4, 2021, 10:11:58 AMJan 4
to visone...@googlegroups.com

Dear Uwe,

 

Thank you for the bug report. I committed a fix into the internal visone repository just now. It will be included in the next release.

Some background: For purposes of density calculation, visone treated all networks as undirected. So the calculated value was the density of the underlying undirected graph, but not of the directed graph itself.

After the fix, visone will now calculate the percentage of occupied dyads without loops. That means:
* The denominator is n(n-1).
* Directed edges are counted once.
* Undirected edges are counted twice (i.e., like two directed edges).
* Parallel edges are treated like a single edge.
* Loops are not considered, neither in the numerator nor in the denominator.


Best wishes,
Julian

 

Reply all
Reply to author
Forward
0 new messages