tnetwork.DCD.MSSCD

tnetwork.DCD.MSSCD(dyn_graph, t_granularity=1, t_persistance=3, t_quality=0.7, t_similarity=0.3, similarity=<function jaccard>, CD='louvain', QC=<function score_conductance>, weighted_aggregation=True, Granularity=None, start_time=None, elapsed_time=False, as_dyn_com=True)[source]

Multi Scale Stable Community Detection

Method described in [1]. This method allows to find stable communities accross multiple temporal scales. In summary, it creates new snapshots by aggregating the existing ones. At each granularity level, it discover stabel communities by

    1. applying a community detection algorithm at each step
    1. keeping communities with the highest quality score as seeds
    1. Expand those seeds to neighbor snashots as long as they remain relevant accordin to the quality score
    1. keep as stable only communities that are present in several successive snapshots

[1] Boudebza, S., Cazabet, R., Nouali, O., & Azouaou, F. (2019). Detecting Stable Communities in Link Streams at Multiple Temporal Scales. LEG workshop, @ECML-PKDD 2019

Parameters:
  • dyn_graph – a dynamic graph
  • t_granularity – (\(\theta_\gamma\) min temporal granularity,scale to analyze
  • t_persistance\(\theta_p\) minimum number of successive occurences for the community to be persistant
  • t_quality\(\theta_q\) threashold of community quality
  • t_similarity\(\theta_s\) threashold of similarity between communities
  • similarity – (CSS)function that give a score of similarity between communities. Default: jaccard
  • CD – CD community detection algorithm. A function returning a set of set of nodes. By default, louvain algorithm
  • QC – (QC)function to determine the quality of communities. Default: inverse of conductance
  • weighted_aggregation – if true, the aggregation over time periods is done using weighted networks
  • Granularity – (\(\Gamma\)) can be used to replace the default scales. List of int.
  • start_time – the date at which to start the analysis. Can be useful, for instance, to start analysis at 00:00
  • as_dyn_com – if true, return a dynamic community object. If False, a custom format with quadruplets (nodes, duration, granularity, quality)
Returns:

a dynamic community object (default) or a list of quadruplets, see parameter as_dyn_com