igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] problems with counting motifs


From: Gabor Csardi
Subject: Re: [igraph] problems with counting motifs
Date: Wed, 21 May 2008 23:13:46 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Dear Lubos Buzna,

actually, the third possibility is that MAvisto -- whatever
it might be -- is wrong. I've just tried the following:

library(igraph)
library(sna)
g <- read.graph("/tmp/Austria.gml", format="gml")
igraph::triad.census(as.directed(g))
sna::triad.census(get.adjacency(g))

and igraph and sna give exactly the same result. This means that 
either
1) both 'igraph' and 'sna' are wrong, this is quite unlikely, 
   as they use completely different code; or
2) MAvisto is wrong; or 
3) igraph and sna define motifs differently than MAvisto.

Both the igraph and the sna versions of the 'triad.census' 
help page have the reference to the original triad census paper, 
please consult that for the definition we're using.

Best,
Gabor

ps. please consider joining the list, or 1) you might miss 
some answers to your questions and 2) your messages might 
be delayed, sometimes even for days if i'm offline. Thanks.

On Wed, May 21, 2008 at 08:32:48PM +0200, Buzna  Lubos wrote:
> Dear igraph team,
> 
>  
> 
> Firstly thank you for the nice tool you are providing.
> 
> I tried to count motifs in the graph (gml file is attached) using following
> code:
> 
> g_austria = igraph.Graph.Read_GML("Austria.gml")
> 
> motifs = g_austria.motifs_randesu(3, None)
> 
>  
> 
> My network is undirected.
> 
> Number of V - shaped motifs I am getting from igraph is 117, however the
> correct number should be 129 (calculated using MAvisto tool).
> 
> Either you have different definition for motifs or there is a bug in igraph.
> 
> Please could you give me some explanations.
> 
>  
> 
> Thank you.
> 
>  
> 
> Best regards,
> 
>  
> 
> Lubos Buzna
> 
> ETH Zurich
> 
>  
> 
>  
> 
>  
> 
>  
> 


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


-- 
Csardi Gabor <address@hidden>    UNIL DGM




reply via email to

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