Search code examples
pythonanacondanetworkx

Memory error when running k_cliques_community


I run k_cliques_community on my network data and received a memory error after a long respond time. The code works perfectly fine for my other data but not this one.

c = list(k_clique_communities(G_fb, 3))
list(c[0])

Here is a snap shot of the trace error enter image description here


Solution

  • I tried running your code on my system with 16 GB RAM and i7 -7700HQ, the kernel died after returning a memory error. I think it's because the computation of k-cliques of size 3 is taking a lot of computational power/memory since you have quite a large no. of nodes and edges. I think you need to look into other ways to find k-cliques, like GraphX - Apache Spark