Reputation: 1
I am trying to plot average ROC curves from different models using ROCR package. I actually made it work, with each curve in different colors. However, in a black and white printing, I need to plot different curves with different symbols, rather than colors. I tried using type="o" and pch options in plot. However, I guess because the ROCR performance creates so many points for plotting an accurate roc curve, the curves just look like a very thick solid lines - you cannot tell which symbol used for each curve.
And here is the code that I used:
pred_our_update<-prediction(prob_our_update,label) perf_our_update<-performance(pred_our_update,"tpr","fpr") plot(perf_our_update,avg="vertical",spread.estimate="stderror",type="o", pch=1,add=TRUE)
Anyone know how to resolve this?
Upvotes: 0
Views: 527
Reputation: 21
One easy solution is using the downsampling option to cut down the amount of data actually plotted, which may let the symbols stand out more without making any material difference to the shape of the curves. I don't know your data set size, but perhaps start with:
plot(perf_our_update,avg="vertical",spread.estimate="stderror",downsampling=0.1,type="o", pch=1,add=TRUE)
Upvotes: 1