这是PRROC中的ROC曲线示例
library(PRROC)
# create artificial scores as random numbers
x <- rnorm( 1000 );
y <- rnorm( 1000, -1 );
# compute area under PR curve
pr <- pr.curve( x, y );
print( pr );
# compute area under ROC curve
roc <- roc.curve( x, y );
print( roc );
# compute PR curve and area under curve
pr <- pr.curve( x, y, curve = TRUE );
# plot curve
plot(pr);
# compute ROC curve and area under curve
roc <- roc.curve( x, y, curve = TRUE );
# plot curve
plot(roc);
我想在这个带有彩色线条的原始图中添加一条对角线,但坐标总是错误的。
我没有那个包,也没用过。也就是说,我看到 CRAN 站点上列出了一个小插图。望着小插曲,似乎有min.plot
和rand.plot
参数。由于 ROC 图上的对角线代表最小值/完全随机模型从长远来看应该如何执行,其中之一可能会创建您所追求的线。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句