def evaluation(graph_file,gt_edges_file,method):
g = nx.read_edgelist(graph_file,create_using = nx.DiGraph(),nodetype = int)
if method == "dfs":
from remove_cycle_edges_by_dfs import dfs_performance
edges_to_be_removed = dfs_performance(graph_file,gt_edges_file)
elif method == "mfas":
from remove_cycle_edges_by_minimum_feedback_arc_set_greedy import mfas_performance
mfas_performance(graph_file,gt_edges_file)
elif method == "pagerank" or method == "ensembling" or method == "trueskill" or method == "socialagony":
from remove_cycle_edges_by_hierarchy import breaking_cycles_by_hierarchy_performance
breaking_cycles_by_hierarchy_performance(graph_file,gt_edges_file,method)
break_cycles.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录