Hi Simone,

On Thu, Jan 31, 2013 at 11:14 AM, Simone Gabbriellini <
[email protected]> 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
>
> PostDoc@DISI, University of Bologna
> mobile: +39 340 39 75 626
> email: [email protected]
> home: www.digitaldust.it
>
> DigitalBrains srl
> Amministratore
> mobile: +39 340 39 75 626
> email: [email protected]
> home: www.digitalbrains.it
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to