[Top][All Lists]

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

[igraph] Working with large networks and how to sample from a graph?

From: Peter Flom
Subject: [igraph] Working with large networks and how to sample from a graph?
Date: Wed, 4 Apr 2012 06:33:52 -0400

Good morning

My second post (and I certainly hope this one isn’t due to a typo!)

I have a large network (about 400,000 nodes and 4 million links).  Visualizing 
this is a problem. There isn't room on any reasonable page to print that sort 
of network.  Estimating betweenness measures on such a large graph is very time 
consuming (even with the estimates, even with relatively low cutoff - and I am 
not sure how a cutoff of 2 would affect things)

 One idea I had was to take a small random sample from the network (say 5,000 
nodes) but I am not sure exactly how to do this in igraph.  Right now, I create 
the graph thus:
g <- graph.empty()
g <- add.vertices(g, nrow(traits), 
                      MORE TRAITS
names <- V(g)$ISBN
ids <- 1:length(names)-1
names(ids) <- names

from <- as.character(links[,1])
to <- as.character(links[,2])

edges <- matrix(c(ids[from], ids[to]), nc=2)
g <- add.edges(g, t(edges))     

Should I sample from the vertices prior to this construction? Or afterwards? 

Also, any references on working with large graphs would be appreciated. My 
prior experience is with much smaller graphs



Peter Flom
Peter Flom Consulting

reply via email to

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