Multiple ROC curves in one plot ROCR

前端 未结 3 1204
北恋
北恋 2021-01-30 17:54

Is it possible to plot the roc curve for diffrent classifiers in the same plot using the ROCR package? I\'ve tried:

>plot(perf.neuralNet, colorize=TRUE)
>li         


        
3条回答
  •  故里飘歌
    2021-01-30 18:40

    Echoing @adibender, and adding a comment: the example doesn't cover how to set separate colors for each individual curve using the second (plot all at once) approach. In this case, pass col as a list:

    library(ROCR)
    data(ROCR.hiv)
    x   <- prediction(ROCR.hiv$hiv.nn$predictions, ROCR.hiv$hiv.nn$labels)
    ROC <- performance(x, "tpr", "fpr")
    plot(ROC, col = as.list(1:10))
    

提交回复
热议问题