snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.17k stars 796 forks source link

wrong k setting in clique community detection example #92

Closed snash4 closed 7 years ago

snash4 commented 7 years ago

file cliquesmain.cpp in cliques folder of examples The default value set for k in cliquesmain is k=2 which then is incremented by one here.. TCliqueOverlap::GetCPMCommunities(G, OverlapSz+1, CmtyV); This is fine but the problem is when user argument suppose k=5 then the algorithm finds cliques of k bcoz of increment

Thus, need to change default value of k to 3 (line 11) and remove the increment (+1) in this line (line number 37). So change lines to these...

[line 11] const int OverlapSz = Env.GetIfArgPrefixInt("-k:", 3, "Min clique overlap"); [line 37] TCliqueOverlap::GetCPMCommunities(G, OverlapSz, CmtyV);

snash4 commented 7 years ago

i had understood it wrong way... The K parameter here is clique overlap, not for finding K cliques.. setting K=3 means the algorithm finds K+1 cliques and communities of K overlap cliques