From: MatlabBo St on 9 Dec 2009 15:55 Hi there, could anybody help me understand the right approach of using the ROC curve? I have labels '0' and '1', and truePositivies and falsePositivies. I would like to use this: [Xplot,Yplot] = perfcurve(truePositivies,falsePositivies,'1'); but I dont know what kind of data do I need to feed the function. Simply, truePositivies = (Y_predicted == Y); falsePositivies = (Y_predicted ~= Y); doesnt help. Thank you very much in advance !
From: MatlabBo St on 10 Dec 2009 14:02 Ok, a revised question: lY = length(Y); for i = 1:10 c = confusionmat(Y_predicted(i),Y); TPR(i) = c(1,1)/lY; FPR(i) = c(1,2)/lY; end I still cannot draw the ROC curve with: perfcurve(TPR,FPR,'1'); What am I missing / not understanding ?
From: MatlabBo St on 10 Dec 2009 16:35 Maybe I should a more general question: How do we use the input parameters of the perfcurve funciton ? labels - labels can be a numeric vector, logical vector, character matrix, cell array of strings or categorical vector. scores - scores is a numeric vector of scores returned by a classifier for some data. This vector must have as many elements as labels does. posclass - posclass is the positive class label (scalar), either numeric (for numeric labels) or char. The specified positive class must be in the array of input labels. Suppose, I have a classfier which has two classes: 0 and 1 ... How would the input params look like so that I can draw the ROC curve afterwards ? Best regads,
From: MatlabBo St on 10 Dec 2009 18:09 P.S. Another good example would be a perfcurve used to draw this: http://gim.unmc.edu/dxtests/ROC2.htm
|
Pages: 1 Prev: Selecting a Region in an Image based on Color Next: Passing objects with fminsearch |