当前位置: 首页>>代码示例>>Python>>正文


Python Network.cutoff_network方法代码示例

本文整理汇总了Python中Network.cutoff_network方法的典型用法代码示例。如果您正苦于以下问题:Python Network.cutoff_network方法的具体用法?Python Network.cutoff_network怎么用?Python Network.cutoff_network使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Network的用法示例。


在下文中一共展示了Network.cutoff_network方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: open

# 需要导入模块: import Network [as 别名]
# 或者: from Network import cutoff_network [as 别名]
print jobman.queue
jobman.runQueue()
jobman.waitToClear()

accs = []
out = open("output_runs.txt", 'w')
csv_out = open("MastersThesis.csv", 'w')
header = 'k,n_models,lambda_w,eta_z,tau,tp,tn,fp,fn,sensitivity,specificity,accuracy,fanins_correct,fanins_incorrect,fanouts_correct,fanouts_incorrect,cascades_correct,cascades_incorrect,feedforward_loops_correct,feedforward_loops_incorrect\n'
csv_out.write(header)
for i, job in enumerate(jobman.finished):
    print job.alg.gene_list
    print job.alg.gather_output(settings)
    jobnet = Network()
    for k in xrange(len(job.alg.gene_list) * len(job.alg.gene_list) + 1):
        jobnet.read_netmatrix(job.alg.network, job.alg.gene_list, "timeseries")
        jobnet.cutoff_network(k)
        #print "\n\n\n\n\n\n"+"dfg4grn-small-net-test_ETAZ=" + str(p[0]) + "_LW="+str(p[1])+"_TAU="+str(p[2])
        MastersThesis = jobnet.calculateAccuracy(goldnet)
        report = jobnet.analyzeMotifs(goldnet)
        print report.ToString()
        out.write("dfg4grn-small-net-test_ETAZ-" + str(p[0]) + "_LW-"+str(p[1])+"_TAU-"+ str(p[2]) + "\n")
        out.write(str(jobnet.calculateAccuracy(goldnet)))
        out.write(report.ToString())
        out.write("\n\n\n")

        cstr = "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{20},{21}\n".format(
        k,
        job.alg.n_models,
        job.alg.lambda_w,
        job.alg.eta_z,
        job.alg.tau,
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:RunSmallNetDFG.py


注:本文中的Network.cutoff_network方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。