This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to calculate/visualize network robustness/vulnerability?

Hi all!

I am trying to differentiate the robustness between Barabasi-Albert (scale free) and Erdos-Renyi (Rnadom graphs). However, The following code fails and I dont know why. Could anyone help me please?

Thank you in advanced.

library(brainGraph)
library(igraph)
ba =sample_pa(10000, directed=F)
er= erdos.renyi.game( length(V(ba)), length(E(ba)), 'gnm'  )
er.b= robustness(er, measure = "btwn.cent")
er.d= robustness(er, measure = "degree")
er.r= robustness(er, measure = "random")
ba.b= robustness(ba, measure = "btwn.cent")
ba.d= robustness(ba, measure = "degree")
ba.r= robustness(ba, measure = "random")
plot(ba.b$comp.size); points(er.b$comp.size, col=2)
erdos-renyi barabasi-albert igraph

0 answers

No answers yet.

Log in to answer this question.