87
$\begingroup$

In other words, instead of having a two class problem I am dealing with 4 classes and still would like to assess performance using AUC.

$\endgroup$
3
  • $\begingroup$ Is dimension reduction an option? $\endgroup$
    – Shane
    Aug 27 '10 at 1:59
  • 3
    $\begingroup$ we have 4 classes, not really $\endgroup$
    – CLOCK
    Aug 27 '10 at 3:03
  • 1
    $\begingroup$ Weka does this perfectly, using the one against all class strategy. $\endgroup$
    – user14474
    Sep 28 '12 at 20:45
64
$\begingroup$

It seems you are looking for multi-class ROC analysis, which is a kind of multi-objective optimization covered in a tutorial at ICML'04. As in several multi-class problem, the idea is generally to carry out pairwise comparison (one class vs. all other classes, one class vs. another class, see (1) or the Elements of Statistical Learning), and there is a recent paper by Landgrebe and Duin on that topic, Approximating the multiclass ROC by pairwise analysis, Pattern Recognition Letters 2007 28: 1747-1758. Now, for visualization purpose, I've seen some papers some time ago, most of them turning around volume under the ROC surface (VUS) or Cobweb diagram.

I don't know, however, if there exists an R implementation of these methods, although I think the stars() function might be used for cobweb plot. I just ran across a Matlab toolbox that seems to offer multi-class ROC analysis, PRSD Studio.

Other papers that may also be useful as a first start for visualization/computation:

References:
1. Allwein, E.L., Schapire, R.E. and Singer, Y. (2000). Reducing multiclass to binary: A unifying approach for margin classifiers. Journal of Machine Learning Research, 1:113–141.

$\endgroup$
0
11
$\begingroup$

I recently found this pROC package in R which plots a multiclass ROC using the technique specified by Hand and Till (2001). You can use the multiclass.roc function.

$\endgroup$
7
$\begingroup$

The answers here are pretty complete, but I still would like to add my 5 cents. In this question you can find an example of R code for producing ROC Curves using One-Vs-All Approach and the ROCR R library.

This is the plot from that answer:

ROC Curve

$\endgroup$
0
5
$\begingroup$

While the math is beyond me this general review article has some references you will likely be interested in, and has a brief description of multi-class ROC graphs.

An introduction to ROC analysis by Tom Fawcett Pattern Recognition Letters Volume 27, Issue 8, June 2006, Pages 861-874

Link to pdf as provided by gd047- thanks

$\endgroup$
3
  • 2
    $\begingroup$ I would say the same providing another link google.gr/… $\endgroup$ Aug 27 '10 at 6:40
  • 1
    $\begingroup$ And here is another one, directly related to multi-class problem: Multi-class ROC analysis from a multi-objective optimisation perspective, Pattern Recognition Letters 2006 27(8): 918-927 (j.mp/9AMgzq). $\endgroup$
    – chl
    Aug 27 '10 at 7:38
  • 1
    $\begingroup$ Thanks for the other links, apparently that whole issue is popular, and its archive on science direct can be found here sciencedirect.com/… $\endgroup$
    – Andy W
    Aug 27 '10 at 13:17
3
$\begingroup$

You need to specify your classifier to act as one-vs-rest, and then you can plot individual ROC curves. There's a handy library for doing it without much work in python called yellowbrick.

Check out the docs with a minimal reproducible example.

The result looks like this (source)

enter image description here

$\endgroup$