tnetwork.DCD.benchmarking.DCD_benchmark

tnetwork.DCD.benchmarking.DCD_benchmark(methods_to_test, mus, nb_coms=[10], subsets=None, iterations=2, min_size=5, max_size=15, operations=20, only_time_statistics=False)[source]

Compute stats and running time for methods

Function to reproduce benchmarks in XXX. Given methods and some parameters, run algorithms, compute stats, and return the results.

Due to some occasional crashes with some methods, it is safer to call the method several times with subsets of parameters and combine the results later.

For scalability tests, don’t forget to set only_time_statistics=True

Parameters:
  • methods_to_test – dictionary {method_name,method}
  • mus – list of mu values (float)
  • nb_coms – list of number of communities
  • subsets – list of subset sizes to test
  • iterations – number of iteration for each combination of parameters
  • min_size – min size of communities
  • max_size – max size of communities
  • operations – number of events in the random graph
  • only_time_statistics – if True, do not compute statistics such as average modularity, smoothness etc., which are very time consuming.
Returns:

communities as a dictionary {ID:{ID:{“}