alan-turing-institute / network-comparison

An R package implementing the NetEMD and NetDis network comparison measures
MIT License
14 stars 3 forks source link

Graphlet Counting is slower than it should be. #107

Open andeElliott opened 6 years ago

andeElliott commented 6 years ago

For a graph that i am testing, it takes almost twice as long to generate the graphlets as it does to to count the orbits.

The underlying code converts from orbits to graphlets, so we just need to speed up the conversion. Timings:

Orbit Counts

tic(); q12 = netdist::count_orbits_per_node(G,4); toc() 0.379 sec elapsed tic(); q12 = netdist::count_orbits_per_node(G,5); toc() 1.425 sec elapsed

graphlets Counts tic(); q12 = netdist::count_graphlets_per_node(G,4); toc() 0.653 sec elapsed tic(); q12 = netdist::count_graphlets_per_node(G,5); toc() 2.306 sec elapsed