What are the MATLAB 'perfcurve' Roc Curve Parameters?

Gwenji picture Gwenji · May 16, 2014 · Viewed 7.8k times · Source

I have been using the LibSVM classifier to classify between 3 different classes - labeled 2, 1, -1

I'm trying to use MATLAB to generate Roc Curve graphs for some data produced using LibSVM but am having trouble understanding the parameters it needs to run.

I assume that:

labels is the vector of labels generated that states into which class my data belongs (mine consists on 1, -1 and 2 and is 60x1 in size)

scores is the variable created by LibSVM called 'accuracy_score' (60x3 in size)

But I don't know what posclass is?

I would also appreciate finding out if my assumptions are correct, and if not, why not?

Answer

Eleanore picture Eleanore · May 30, 2014

See here for a clear explanation:

Given the following instruction: [X,Y] = perfcurve(labels,scores,posclass); labels are the true labels of the data, scores are the output scores from your classifier (before the threshold) and posclass is the positive class in your labels.