会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
GNEPIUHUX
知足常乐
博客园
首页
新随笔
联系
订阅
管理
关于 f1_score 和 roc_auc_score
使用
sklearn
中
f1_score
过程中的警告
警告信息:UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
这个警告信息是说在所有的真实标签中存在标签没有被预测过,比如说:y_true = [0,2,1,3],y_pred = [2,2,3,3]
使用
sklearn
中
roc_auc_score
过程中的错误
错误信息:ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
这个错误是说在 y_true 中有一列只有一种类别,比如:
y_true = [[0, 1, 0]
[1, 0, 0]
[1, 0, 0]]
其中最后一列只有 0 也就是只有一个类别。将
y_true
变回直接的数字标签形式,即 [1,0,0],这个错误消失了
posted @
2020-06-08 10:25
GNEPIUHUX
阅读(
641
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
公告