小编its*_*lwg的帖子

R: Plot multiple different coloured ROC curves using ROCR

The following code was taken from @adibender answer to "Multiple ROC curves in one plot ROCR". The code is partly from ?plot.performance.

library(ROCR)
data(ROCR.simple)
preds <- cbind(p1 = ROCR.simple$predictions, 
            p2 = abs(ROCR.simple$predictions + 
            rnorm(length(ROCR.simple$predictions), 0, 0.1)))

pred.mat <- prediction(preds, labels = matrix(ROCR.simple$labels, 
            nrow = length(ROCR.simple$labels), ncol = 2) )

perf.mat <- performance(pred.mat, "tpr", "fpr")
plot(perf.mat)
Run Code Online (Sandbox Code Playgroud)

I want to illustrate several ROC curves in a single plot, like the code above, using the r package ROCR. However, i would want the …

plot r machine-learning data-mining roc

4
推荐指数
1
解决办法
6074
查看次数

标签 统计

data-mining ×1

machine-learning ×1

plot ×1

r ×1

roc ×1