'x' 是一个列表,但没有组件 'x' 和 'y' [英] 'x' is a list, but does not have components 'x' and 'y'

查看:50
本文介绍了'x' 是一个列表,但没有组件 'x' 和 'y'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 pROC 包中的 multiclass.roc 函数为多类问题绘制 ROC 曲线,但出现此错误:

i am trying to plot a ROC curve for a multiclass problem, using multiclass.roc function from pROC package, but I get this error:

'x' is a list, but does not have components 'x' and 'y'

此错误是什么意思,导致在网络中搜索并没有帮助我找到答案.我可以打印 roc 对象,但无法绘制它.

What does this error mean cause searching in the web didn't help me to find an answer. I can print the roc object, but can not plot it.

谢谢!

推荐答案

如果你在列表上调用 plot l: plot (l),x 坐标取自 l$x,y 坐标取自 l$y.您的列表没有元素 x 和 y.

If you call plot on a list l: plot (l), the x coordinates will be taken from l$x and the y coordinates from l$y. Your list doesn't have elements x and y.

您需要调用 plot (l$your.x.coordinate, l$your.y.coordinate) 代替.

这篇关于'x' 是一个列表,但没有组件 'x' 和 'y'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆