4

Let's say I have a very large graph that proves impractical for visualization ends and I wanted to sample a random subgraph.

(I know that I can filter out a subgraph via measures like degree, components, weights... but this is not my point)

Is there any procedure that I can use to get a random sample from the graph? I see that the igraph package has two sampling functions that seem however to be generic and not specifically designed for sampling graphs. But if they are in that package there must be a reason!

(Is it as easy as random sampling edges i.e. rows?)

Dario Lacan
  • 227
  • 1
  • 9
  • As far as I'm aware there's no one way to sample a graph because the idea of sampling a graph isn't well-defined. Do you sample nodes and let edges "fall off"? Do you sample edges and leave isolated nodes? What are you trying to accomplish? – shadowtalker Dec 11 '14 at 11:09
  • 1
    This is exactly the point of my question: I wondered if the idea of sampling from a graph has been defined by anyone. The aim would be to preserve "the most" of the original graph - this could be defined as keeping some measures invariant, as in a geometric transformation. (A graph is a topological object if I am not wrong.) – Dario Lacan Dec 11 '14 at 11:46

1 Answers1

5

There is a large number of research on graph sampling (easily discoverable by simple Internet search, by the way). The following is just a small representative sample of this research stream:

Aleksandr Blekh
  • 7,867
  • 2
  • 27
  • 93
  • Thank you Aleksandr. I do not see any method that has been implemented in a r package, isn't it? – Dario Lacan Dec 11 '14 at 14:19
  • @DarioLacan: You're welcome. Yes, to the best of my knowledge and based on extensive search, currently there are no R packages, implementing graph sampling of any type. Thank you for accepting, feel free to upvote as well, if you like my answer. I will update it and let you know, if I will run across new or relevant information. – Aleksandr Blekh Dec 11 '14 at 22:40
  • @AleksandrBlekh: Have you since found any R packages for graph sampling? – histelheim Nov 03 '15 at 20:39
  • @histelheim: No, as I simply haven't searched since (deviated to other matters). However, I'm still curious about the topic. So, please feel free to comment or update the answer, should you find relevant R packages. – Aleksandr Blekh Nov 03 '15 at 21:55