gpt4 book ai didi

python - UndefinedMetricWarning : No positive samples in y_true, 真正的正值应该是无意义的 UndefinedMetricWarning)

转载 作者:太空宇宙 更新时间:2023-11-03 21:22:56 26 4
gpt4 key购买 nike

我收到这个警告

UndefinedMetricWarning: No positive samples in y_true, true positive value should be meaningless UndefinedMetricWarning)

你知道这意味着什么吗?

最佳答案

这意味着 y_true 中的所有值均为零,这意味着给定数据集中没有正类记录。

尝试以下操作来了解数据集中类的分布。

from collections import Counter
Counter(y_true) # y_true must be your labels

关于python - UndefinedMetricWarning : No positive samples in y_true, 真正的正值应该是无意义的 UndefinedMetricWarning),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54099969/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com