Background
I answer this because I need to work with content, and such a question is a great excuse. Thank you for the good opportunity.
I use data from the built-in fish data: http://archive.ics.uci.edu/ml/datasets/Iris
I also use code snippets from the Mathworks tutorial on classification, and for plotroc
Description of the problem
In the region there is a clearer border for the classification of "setosa", but there is a match for "versicoloir" vs. "virginica". This is a two-dimensional plot, and some other data has been discarded to produce it. In this case, the ambiguity within the boundaries of the classification is useful.
%load data load fisheriris %show raw data figure(1); clf gscatter(meas(:,1), meas(:,2), species,'rgb','osd'); xlabel('Sepal length'); ylabel('Sepal width'); axis equal axis tight title('Raw Data')

Analysis
Suppose we want to define the boundaries for a linear classifier that defines "virginica" versus "non-virginica". We could look at “I versus not-I” for other classes, but they would have their own
So, now we make some linear discriminants and build ROC for them:
%load data load fisheriris load iris_dataset irisInputs=meas(:,1:2)'; irisTargets=irisTargets(3,:); ldaClass1 = classify(meas(:,1:2),meas(:,1:2),irisTargets,'linear')'; ldaClass2 = classify(meas(:,1:2),meas(:,1:2),irisTargets,'diaglinear')'; ldaClass3 = classify(meas(:,1:2),meas(:,1:2),irisTargets,'quadratic')'; ldaClass4 = classify(meas(:,1:2),meas(:,1:2),irisTargets,'diagquadratic')'; ldaClass5 = classify(meas(:,1:2),meas(:,1:2),irisTargets,'mahalanobis')'; myinput=repmat(irisTargets,5,1); myoutput=[ldaClass1;ldaClass2;ldaClass3;ldaClass4;ldaClass5]; whos plotroc(myinput,myoutput)
The result is shown below, although it required the removal of duplicate copies of the diagonal:

In the code that I add "myinput" and "myoutput", you can mark them as inputs to the "plotroc" function. You should take the results of your classifier as goals and evidence, and you can get similar results. This compares the actual result of your classifier with the ideal output of your target values. This is a contribution to plotroc.
So, this will give you a “built-in” ROC, which is useful for quick work, but does not force you to study each step in detail.
Questions you may ask at this point include:
- which classifier is better? How to determine what is best in this case?
- What is the convex hull of classifiers? Is there any mixture of classifiers that is more informative than any pure method? Is a bag possible?