gap_from_csv.py 文件源码

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

项目:Y8M 作者: mpekalski 项目源码 文件源码
def combine_pred_csv(fn1, fn2, fn_out='/tmp/combo.csv', wgts=None):
    """ linear add the probabilities from two prediction.csv files.
    inputs:
        fn1, fn2: files to be combined.
        fn_out: output file name
        wgts: a list of two values, for example, [0.5, 0.5]
    output:
        no return values
    """

    executor = futures.ProcessPoolExecutor(max_workers=2)

    t1 = datetime.now()
    print('start combination at ', t1)

    preds1, preds2 = executor.map(file_2_series, (fn1, fn2))       

    t2 = datetime.now()
    print('files read by', t2)

    return combine_preds_2_csv(preds1, preds2, fn_out, wgts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号