User 942 | 11/23/2014, 5:50:07 PM
I am trying to extract all the subgraphs from connected components. What is the optimal way to do it ?
I have tried several approach such as grouping vertices by component ids and then trying to apply a closure to extract the edges of the subgraph, creating the subgraph and dumping it to disk but I have a Pickling error: cannot pickle object of class graph.SGraph (even though I use json)
I also tried the getneighborhood <code class="CodeInline">g.getneighborhood(ids=map(int, x['ids'].tolist()), radius=1, full_subgraph=True)</code>
But I have the same issue. I think graph lab does not like to apply a closure which does a <b class="Bold">filter_by operation on a global graph</b> inside and <b class="Bold">apply</b> function but I am not sure.
I now have switched to a triple-apply function to label the edge with their respective componentid. In my graph I now have nodes and edges labeled with their componentid. Is it possible to extract subgraphs in parallel ?