sospcat.compare

Module holding functions for a quantitative comparison of groupings

social_vs_spatial(node_locations, soc_membership, **kwargs)[source]

This method relies on the homogeneity_completeness_v_measure() method form the sklearn.metrics package.

See also

V-Measure:
A conditional entropy-based external cluster evaluation measure
Andrew Rosenberg and Julia Hirschberg, 2007
Parameters
  • node_locations (dict(int, tuple)) – Specify for each node (key) its position (value) in the form of a (x, y) tuple.

  • soc_membership (dict) – Holds for each node (key) the social group affiliation (value).

  • **kwargs – All keyword arguments forwarded to spatial.get_groups()

Returns

homogeneity, completeness, v-measure – Homogeneity, completeness and v-measure as computed by the homogeneity_completeness_v_measure().

Return type

tuple