UndefinedMetricWarning:y中没有正样本,true正值应该是无意义的UndefinedMetricWarning)

2024-09-23 22:28:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我收到警告了

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

你知道这是什么意思吗?在


Tags: nointrue警告valuebesamplesshould
1条回答
网友
1楼 · 发布于 2024-09-23 22:28:08

这意味着y\u true中的所有值都是零,这意味着给定数据集中没有正的类记录。在

尝试这样做以了解数据集中类的分布情况。在

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

相关问题 更多 >