more_nodes.py 文件源码

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

项目:cuicuilco 作者: AlbertoEsc 项目源码 文件源码
def cumulative_score(ground_truth, estimation, largest_error, integer_rounding=True):
    if len(ground_truth) != len(estimation):
        er = "ground_truth and estimation have different number of elements"
        raise Exception(er)

    if integer_rounding:
        _estimation = numpy.rint(estimation)
    else:
        _estimation = estimation

    N_e_le_j = (numpy.absolute(_estimation - ground_truth) <= largest_error).sum()
    return N_e_le_j * 1.0 / len(ground_truth)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号