sklearn.metrics.precision_score 中 unknow is not supported 问题
来源:互联网 发布:excel表格怎么数据统计 编辑:程序博客网 时间:2024/06/05 15:04
最近用 XGBoost 对某些东西分类,类别用 1,2,3,4,5,6,7 来表示。
然后交叉验证出了 test_y 和 preds 集合,使用 precision_score() 函数缺报错,提示
unknown is not supported
经过研究,发现类别是用 object 类型表示的,而 precision_score() 需要用 int 来表示,改正:
test_y = np.array(test_y.astype(int))
preds = preds.astype(int)
即可。
阅读全文
1 0
- sklearn.metrics.precision_score 中 unknow is not supported 问题
- sklearn: metrics
- ssl is not supported
- iOS iOS8中 问题"registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later" 解决方案
- iOS iOS8中 问题"registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later" 解决方案
- 解决eclipse中web项目出现Project facet Java version 1.8 is not supported.的问题
- sklearn的precision_score, recall_score, f1_score使用
- Project facet Java 6.0 is not supported的问题
- Project facet Java 6.0 is not supported的问题
- Address Family is not supported
- SNMP++: Transport is not supported
- svn: SSL is not supported
- Redirection is not supported.解决
- sklearn.metrics.confusion_matrix
- sklearn.metrics.classification_report
- sklearn.metrics.roc_curve用法
- python sklearn.metrics roc_curve
- sklearn Classification metrics
- Mybatis 参数无法获取Parameter not found
- 796B
- Linux下用户组、文件权限详解
- 头条号如何提升互动度
- session和cookie作用原理,区别
- sklearn.metrics.precision_score 中 unknow is not supported 问题
- 01背包问题
- Powershell 编写和运行脚本
- swt浏览文件 显示文件目录 swt显示图片以及图片缩放处理
- Vivado IP核生成设置
- reshape
- 记一次艰难的MySQL库的安装过程
- uiautomator1.0入门介绍
- 利用AI视频监控“预测犯罪”,这事儿到底靠谱吗?