break_cycles.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:breaking_cycles_in_noisy_hierarchies 作者: zhenv5 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号