[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] random weighted graphs
From: |
Umberto77 |
Subject: |
[igraph] random weighted graphs |
Date: |
Mon, 23 Jul 2012 15:16:13 +0200 |
Hi all,
thank for the answers to all of my questions previously posted.
I need to compare both binary and weighted network indexes from a real multiple directed network - with loops - to random ones.
Thus, I was thinking ot generate some thousands of random graphs and then to look at the distribution of the average indexes' values, keeping constant the number of vertices and edges (163 and 573, respectively). This should be enough right now.
While for the binary version of my network I was thinking to use:
randomgraph<-erdos.renyi.game(163, 573, type=c("gnm"), directed=TRUE, loops=TRUE)
I don't know how do to it with the weighted network, is ot say, how to randomly distribute weights belonging to a set range (i.e.ranging from 0 to 1 billion).
Also, I was wondering if this function to iterate the random graph generation and storing the average node degree (ND), is correct or not.
for (i in 1:3000){
randomgraph<-erdos.renyi.game(163, 573, type=c("gnm"), directed=TRUE, loops=TRUE)
nodeDegree[i]<-mean(degree(graph))
}
Thanks a lot,
P.s. I've seen that the on line tutorial is growing, thank you.
Umberto
----
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it
Sponsor:
Cesenatico Pasini Hotels Solo per questa settimana imperdibile offerta All Inclusive all' Hotel Stacchini al prezzo di 410 Euro, tantissimi sconti anche sui bambini!!!
Clicca qui
- [igraph] random weighted graphs,
Umberto77 <=