validation.py 文件源码

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

项目:DRM 作者: JohnZhengHub 项目源码 文件源码
def test_single(data, label, model):
    prediction = model.predict(data)
    #return float(np.sum(prediction == label)) / len(label)
    pre, rec, f1, support = metrics.precision_recall_fscore_support(label, prediction)
    f1 = (100*sum(f1[1:] * support[1:])/sum(support[1:]))
    return f1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号