ROC curves for multiclass classification in R
<p>I have a dataset with 6 classes and I would like to plot a ROC curve for a multiclass classification. The first answer in this thread given by Achim Zeileis is a very good one.</p>

<p><a href="https://stackoverflow.com/questions/30818188/roc-curve-in-r-using-rpart-package">ROC curve in R using rpart package?</a></p>

<p>But this works only for a binomial classification. And the error i get is <code>Error in prediction, Number of classes is not equal to 2</code>. Any one who has done this for a multi-class classification?</p>

<p>Here is a simple example of what I am trying to do.
    data &lt;- read.csv("colors.csv")</p>

<p>let's say <code>data$cType</code> has <strong><code>6</code></strong> values (or levels) as (<strong>red, green, blue, yellow, black</strong> and <strong>white</strong>)</p>

<p>Is there anyway to plot a ROC curve for these 6 classes? Any working example for a class of more than 2 would be appreciated.</p>