igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Multiplex networks: Edge type related metrics by node


From: Gábor Csárdi
Subject: Re: [igraph] Multiplex networks: Edge type related metrics by node
Date: Mon, 1 Dec 2014 09:43:31 -0500

On Sun, Nov 30, 2014 at 3:33 AM, lookman sanni <address@hidden> wrote:
Hello,

Thank you. Sounds a good way doing it. I am actually defining my edge types with an attribute. This is likely working for my first question. Can the below be optimized ?

What is slow here? The subgraph? How slow? How big are your graphs?
 
g <- graph.atlas(711)
E(g)$type <- c(1,2,3,4,3,2,1,1,3,2)
E(g)$color <- ifelse(E(g)$type>=3,"blue","yellow")
# I can separate by graph
g2 <- subgraph.edges(g,which(E(g3)$type>=3),delete.vertices =FALSE)
g3 <- subgraph.edges(g,which(E(g3)$type<3),delete.vertices =FALSE)
# Identification of nodes having edges in both graphs
which(ifelse(degree(g2)>0,1,0) + ifelse(degree(g3)>0,1,0) > 1)

Inline image 1

As far as my second question is concerned, if for instance I have the requirement that I should not have blue edges between 2 different nodes, without having another orange edges between those two nodes (that is 6->5, 5->4, 4->3,3->7 are all violating this requirement) how could I measure that ? Otherwise said, how can I measure the fact that edges of a given subgraph exist as well in another subgraph ?

If this is about specific edges, then assign some ids to them as an edge attribute, and these ids are kept in the subgraph, and can be used to check whether the edges are in some subgraph.

Gabor
 

Kind regards,




On Sat, Nov 29, 2014 at 6:53 PM, Gábor Csárdi <address@hidden> wrote:
Hi,

one solution is to use edge attributes to mark edge types. To
calculate metrics over some edge type you'll need to create a subgraph
that contains only those edges. This is easy and a linear operation.

Another solution is to have a separate network for each edge type.

Gabor

On Fri, Nov 28, 2014 at 5:22 PM, lookman sanni <address@hidden> wrote:
> Hello everyone. I am new to SNA and learning how to use the igraph package.
> I have built a multiplex network from some flat file and would like to
> compute couple of metrics on top of that network:
>
> The number of edge types by node (multiplexity)
> A metric (matrix, contingent table) of edge types association between the
> same nodes (e.g: money transfer + good transfer: 20 pairs of nodes; money
> transfer + kinship: 120 pairs of nodes)
>
> I have not seen any likely metrics in my web searches. Would I need to write
> them ? If yes, is there any available guideline on how to contribute to
> igraph ?
>
> --
> Best Regards
>
> Lookman SANNI
> http://blog.lookouster.org
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



--
Best Regards

Lookman SANNI
http://blog.lookouster.org

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]