Hi,
thank you Tamas for your response. The bipartite graph that I am
using is not directed.
If I understand your answer correctly on how to calculate
density, then, the code above might be wrong, because it says
# Number of top and bottom nodes
top<-length(V(g)[type==FALSE])
bottom<-length(V(g)[type==TRUE])
# Number of edges
m<-ecount(g)
# Mean degree for top and bottom nodes
ktop<-m/top
kbottom<-m/bottom
# Density for bipartite network
bidens<-m/(top*bottom)
So, it takes the actual existing number of edges in the bipartite
graph and divides it by the product of the number of nodes for each
type. Based on your described ratio, it seems to miss the total
number of possible edges between the top and bottom vertices, right?
In my case and as an example, we have 11 "top" vertices and 17
"bottom" vertices and the number of edges (m) is 215 (because in
this graph, there can be multipe edges between a top and a bottom
vertice). If I take the numbers and calculate the density in the
following way 215/(11*17), I get 1.15.
So, is there anything missing in the calculation or could the
multiple edges in the network be the problem here? And how could it
be solved?
Best wishes,
Stefan
Am 06.06.2017 um 20:34 schrieb Tamas
Nepusz:
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
--
Stefan Wallaschek
Visting PhD fellow at School of Politics and International Relations (SPIRe)
University College Dublin
--
address@hidden
PhD Fellow
Bremen International Graduate School of Social Sciences (BIGSSS)/
University of Bremen
Mary-Somerville-Straße 9
P.O. Box 33 04 40
28359 Bremen (Germany)
https://www.bigsss-bremen.de/people/phd-fellows/stefan-wallaschek
Twitter: https://twitter.com/s_wallaschek