easygraph.functions.structural_holes.weakTie module#

easygraph.functions.structural_holes.weakTie.weakTie(G, threshold, k)[source]#

Return top-k nodes with highest scores which were computed by WeakTie method.

Parameters:
  • G (easygraph.DiGraph) –

  • k (int) – top - k nodes with highest scores.

  • threshold (float) – tie strength threshold.

Returns:

  • SHS_list (list) – The list of each nodes with highest scores.

  • score_dict (dict) – The score of each node, can be used for WeakTie-Local and WeakTie-Bi.

See also

weakTieLocal

Examples

# >>> SHS_list,score_dict=weakTie(G, 0.2, 3)

References

[1]

Mining Brokers in Dynamic Social Networks. Chonggang Song, Wynne Hsu, Mong Li Lee. Proc. of ACM CIKM, 2015.

easygraph.functions.structural_holes.weakTie.weakTieLocal(G, edges_plus, edges_delete, threshold, score_dict, k)[source]#

Find brokers in evolving social networks, utilize the 2-hop neighborhood of an affected node to identify brokers.

Parameters:
  • G (easygraph.DiGraph) –

  • edges_plus (list of list) – set of edges to be added

  • edges_delete (list of list) – set of edges to be removed

  • threshold (float) – tie strength threshold.

  • score_dict (dict) – The score of each node computed before.

  • k (int) – top - k nodes with highest scores.

Returns:

SHS_list – The list of each nodes with highest scores.

Return type:

list

See also

weakTie

Examples

# >>> SHS_list=weakTieLocal(G, [[2, 7]], [[1,3]], 0.2, score_dict, 3)

References

[1]

Mining Brokers in Dynamic Social Networks. Chonggang Song, Wynne Hsu, Mong Li Lee. Proc. of ACM CIKM, 2015.