tnetwork.DCD.analytics.dynamic_partition.longitudinal_similarity

tnetwork.DCD.analytics.dynamic_partition.longitudinal_similarity(dynamicCommunityReference: tnetwork.dyn_community.communities_dyn_sn.DynCommunitiesSN, dynamicCommunityObserved: tnetwork.dyn_community.communities_dyn_sn.DynCommunitiesSN, score=None, convert_coms_sklearn_format=True)[source]

Longitudinal similarity

The longitudinal similarity between two dynamic clusters is computed by considering each couple (node,time) as an element belong to a cluster, a cluster containing therefore nodes in differnt times It takes into account the fact that the reference might by incomplete by removing from the partition to evaluate all (node,time) not present in the reference.

Parameters:
  • dynamicCommunityReference – the dynamic partition used as reference (ground truth)
  • dynamicCommunityObserved – the dynamic partition to evaluate (result of an algorithm)
  • score – community comparison score, by default the adjsted NMI. (sklearn)
  • convert_coms_sklearn_format – if the score expect in input clusters represented as in sklearn, True. if False, score will receive in input lists of sets of nodes
Returns:

score