示例#1
0
    'LOUVAIN_CRSRA',  #31
]

# 实验中使用的方法的id
method_ids = [
    0
]  #,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
sim_method_list = [sim_methods[i] for i in method_ids]

# 按照数据集,分别计算
for i in range(len(graph_file_list)):
    graph_file = graph_file_list[i]
    result_file = result_file_list[i]
    out_file = open(result_file, 'w')  # 打开结果文件
    print(graph_file)
    # 输出标题
    #    out_file.write('Method\tAUC\tRanking_Score\ttime (ms)\tPrecision (10)\n')
    out_file.write('Method\tAUC\tRanking_Score\ttime (ms)\n')

    # 按照不同的相似度方法分别计算
    for method in sim_method_list:
        print(method)
        out_file.write(method + '\t')
        lp.LP(graph_file, out_file, method, t, p)
        out_file.flush()
    # end for
    out_file.close()
# end for

###############################################################################
示例#2
0
文件: bec.py 项目: rodsveiga/decoders
 def __init__(self, p, _code, **kwargs):
     super().__init__(lp.LP(_code.parity_mtx, **kwargs))