def Link_Prediction(index, G, ebunch=None):
#G = nx.complete_graph(5)
if index == "RA":
Rank_List = resource_allocation_index(G, ebunch)
if index == "AA":
Rank_List = adamic_adar_index(G, ebunch)
if index == "CN":
Rank_List = common_neighbor_index(G, ebunch)
if index == "LP":
Rank_List = local_path_index(G, ebunch)
if index == "SD":
Rank_List = structure_dependent_index(G, ebunch)
return Rank_List
评论列表
文章目录