Ensemble Methods¶
Methods to automate the execution of multiple instances of community detection algorithm(s).
Configuration Objects¶
Ranges can be specified to automate the execution of a same method while varying (part of) its inputs.
Parameter
allows to specify ranges for numeric parameters, while BoolParamter
for boolean ones.
Parameter (name, start, end, step) |
|
BoolParameter (name, value) |
Multiple Instantiation¶
Two scenarios often arise when applying community discovery algorithms to a graph: 1. the need to compare the results obtained by a give algorithm while varying its parameters 2. the need to compare the multiple algorithms
cdlib
allows to do so by leveraging, respectively, grid_execution
and pool
.
grid_execution (graph, method, dict], …) |
Instantiate the specified community discovery method performing a grid search on the parameter set. |
pool (graph, methods, dict], object], …) |
Execute on a pool of community discovery internal on the input graph. |
Optimal Configuration Search¶
In some scenarios it could be helpful delegate to the library the selection of the method parameters to obtain a partition that optimize a given quality function.
cdlib
allows to do so using the methods grid_search
and random_search
.
Finally, pool_grid_filter
generalizes such approach allowing to obtain the optimal partitions from a pool of different algorithms.
grid_search (graph, method, dict], object], …) |
Returns the optimal partition of the specified graph w.r.t. |
random_search (graph, method, dict], object], …) |
Returns the optimal partition of the specified graph w.r.t. |
pool_grid_filter (graph, methods, dict], …) |
Execute a pool of community discovery internal on the input graph. |