igraph-help
[Top][All Lists]
Advanced

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

[igraph] Triad Census -- 003 Counts


From: Wojciech Gryc
Subject: [igraph] Triad Census -- 003 Counts
Date: Sun, 14 Mar 2010 03:29:55 +0000

Hi everyone,

I'm currently implementing a configuration model for an unweighted, directed graph where the algorithm will avoid multiple edges and self-loops. Please let me know if this already exists.

I'm using triad.census() to test this, as it is my understanding that if every node keeps its in- and out-degrees constant, then (1) the degree distributions will remain the same, and (2) the number of isolates will also remain the same. As such, running a triad.census() on the original graph and a random configuration model based on the original graph should yield the same count for the 003 triad.

Am I correct in assuming this? When I actually perform the above, I get different results for the random and observed graphs. The in- and out-degree distributions are the same, and in fact, every node (based on its numeric id) has the same in and out degrees... Yet the triad census an empty graph of size 3 changes... So I'm not sure if it's my logic or if I don't quite understand how igraph works.

Any help would be appreciated. Some output is below (I'm using R):

> # g is the observed graph, gr is the graph based on the configuration model.
> summary(g)
Vertices: 16738
Edges: 101905
Directed: TRUE

> triad.census(g)
 [1] 779821451183   1483698934     83414749      1518068     20229855      2132414      1069000       385470       545628         2391        60790       103245
[13]        76525        16040        25957         4887

> triad.census(gr)
 [1] 779754627648   1616301243     16190059      2044834     20913504      3205118       671378       146556       519883         7679        14054        50521
[13]        21976        13009         6965          709


Again, I'd be grateful for any advice or help.

Thanks in advance,
Wojciech

reply via email to

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