metrics.py 文件源码

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

项目:senti 作者: stevenxxiu 项目源码 文件源码
def f1(average_classes):
    # noinspection PyShadowingNames
    def f1(y_true, y_pred, theano=False):
        if theano:
            raise NotImplementedError
        else:
            return np.mean(precision_recall_fscore_support(y_true, np.argmax(y_pred, axis=-1))[2][average_classes])

    return f1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号