ta.TwitterAnalysis.print_commty_cluster_metrics

TwitterAnalysis.print_commty_cluster_metrics(G, comm_att='community_louvain', ignore_cmmty_lt=0, acc_node_size_cutoff=None)[source]

Calculates clustering metrics for top degree nodes

Parameters
  • G – undirected networkx graph created from the Twitter data

  • comm_att ((Optional)) – Possible values: ‘community_louvain’ or ‘spectral_clustering’. (Default=’community_louvain’)

  • ignore_cmmty_lt ((Optional)) – Number used to ignore small communitites. The logic will not calculate metrics for communities smaller than this number. (Default=0)

  • acc_node_size_cutoff ((Optional)) – The average clustering coefficient metric can take a long time to run, so users can set a cutoff number in this parameter for the graph size that will decide if that metric will be printed or not depending on the graph size. (Default=None)

Examples

>>> print_commty_cluster_metrics(G, 'community_louvain', '10')