igraph-help
[Top][All Lists]

Re: [igraph] average neighbors' degree on bipartite networks

 From: Gábor Csárdi Subject: Re: [igraph] average neighbors' degree on bipartite networks Date: Thu, 31 Jan 2013 13:50:32 -0500

Hi Simone,

On Thu, Jan 31, 2013 at 11:14 AM, Simone Gabbriellini wrote:
Hello List,

I have a question regarding graph.knn() if applied on bipartite
networks. When I calculate this:

graph.knn(g, V(g)[type==FALSE])

\$knn
u43      u62       u9      u17      u19     u102     u127
u142      u64     u137
3.750000 4.250000 4.181818 4.571429 5.600000 5.200000 6.000000
5.333333 5.166667 6.000000
[...]

what these numbers represents? for each node of set1, I have the
average degree of the nodes in set2?

The average degree of the neighbors of the node. Since your graph is bipartite, yes, all these neighbors are in set 2.

if yes, is it possible to extend
this concept to check for the average degree of dist-2 neighbors -
i.e. nodes still belonging to set1?

Yes, but this is not in igraph and you need to code it for yourself, probably using neighborhood() is easiest. For bipartite graphs it might be very easy, actually, because all you need to do for a vertex in set 1 is taking an order 2 neighborhood, and then removing all vertices from set 2 (first neighbors) and the maybe the node itself, and you end up with the dist-2 neighbors.

G.

Many thanks,
Simone

--
Simone Gabbriellini, PhD

mobile: +39 340 39 75 626
home: www.digitaldust.it

DigitalBrains srl
Amministratore
mobile: +39 340 39 75 626
home: www.digitalbrains.it

_______________________________________________
igraph-help mailing list