Dear Tamas, Thanks for your reply. It more than answers my question. I just wanted to know/understand the processes by which a weighted network could be randomized. Thanks again.
Anupam On Sat, Jun 1, 2013 at 7:31 PM, Tamás Nepusz <[email protected]> wrote: > > I have a rather naive question to ask. How do you > randomize a weighted network(edges are weighted)? > Well, what do you want to achieve with randomization? Do you have any > specific properties of the network that you wish to preserve during > randomization? When you randomize an unweighted network, you typically wish > to preserve the degree distribution -- is this the case here as well? Or do > you want to preserve the *strength* of each node (i.e. the sum of weights > of edges incident on each node)? Either way, igraph has no built-in support > for weighted network randomization whatsoever, so you first have to decide > what exactly you want to achieve and then code it yourself. > > Two dead simple cases of randomization come to my mind that can be > implemented relatively easily using the existing tools in igraph: > > 1. Keep the edges exactly as they are, but shuffle the weights around. > This can be achieved by retrieving the weight vector of the edges, > shuffling the weight vector, and re-assigning the shuffled copy to the > edges. T > > 2. Shuffle the edges while preserving the degree distribution, and shuffle > the weights as well. This is almost the same as case 1, but before > re-assigning the shuffled copy, you also call the rewire() method of the > graph (or call igraph_rewire if you are using the C core directly). > > -- > T. > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > -- Graduate Student, Laboratory of Computational Biology, Center For DNA Fingerprinting And Diagnostics, 4-1-714 to 725/2, Tuljaguda complex Mozamzahi Road, Nampally, Hyderabad-500001
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
