From bfb6313f9ca429310c00c83c3947ce83a4503167 Mon Sep 17 00:00:00 2001 From: kirk86 Date: Thu, 22 May 2014 20:46:39 +0300 Subject: [PATCH 1/2] added precision recall curves --- cbires.fig | Bin 7348 -> 7503 bytes cbires.m | 63 +++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/cbires.fig b/cbires.fig index 37fcee9c0439d20d013f9d1f1284f5276c6c7abc..121d67bdb1528e7df749b78dc7dd3ba83af58cb4 100644 GIT binary patch delta 7451 zcmV+$9pvJ)InO$fG8j{JZXiuzc_1-3ATlvJH8VOeIUq7HF*K1;BavVSf9)Fp00000 z0003=O%DJ70A(8h0C=42Sdt2YDlP) zN=OEGydK+w*So8kUAN{BfNKvR6;9#QD+q)*7EVC|snDtl5|t{1s;WW}Qg0l9ncW$C zckIL;`D&#;W%Txq_r0C@f6d4H&14V&F#inzy-XiwB?^2wBdrd_tUI6RU3&AMQG*>->`{gBjR90fnLN$jv$lOQXABR1(%>k|K4r-!KF{sb2+w#H12)<@PI$7JP&JP?)w^{(tx3GvOHaIfneg=uq1T1JDfDfj zH-!FO=zBu{A@rX@-xvCU&<}t2hMC&&0saKgidRMDtN7>)Y z+UK7!`K_cqe}DF?BWI@&wQD8voT!aSB)%hNeKh|OVL1BN(3gddXf-*(_R|gibnYYBd7Gt{v=LB&j z$Uu-vcFQIY{;)=Mp{^rZ5f&&9)mC0F=Xyc-KK!t_Ptkq$JJh9L-#&jYw$Hdky7U_W-Jh>1F55)XFTdXZ zEB)k`Yl%Cz{yqQc`#&U(qf;OK^vXu!<9~(+bKraLK5czuYrJGz_F_G0EpX^laP9MO z)h*K@mLckQw65;?>k4$pf91Nm1RC#&lOjJ#TU|FPwxybZrKhetbzOFQ4{P$fX@gPh ze_TDz)mS~wP>X(g`)sT`TzGrS&@o_^SeD?b6xonKr*?%-S+>D~@^Z<$rp`ggh*_l0 z_h$V*q4b;EEUzsSt3Y5m&gp(Fp^VRq3+{#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PH^c)!Q}-{*dB;tLS?JrWzY@ALow diff --git a/cbires.m b/cbires.m index 617fd01..1f2debc 100644 --- a/cbires.m +++ b/cbires.m @@ -22,7 +22,7 @@ % Edit the above text to modify the response to help cbires -% Last Modified by GUIDE v2.5 23-May-2013 22:01:15 +% Last Modified by GUIDE v2.5 18-May-2014 21:53:08 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; @@ -283,16 +283,22 @@ function btnPlotPrecisionRecall_Callback(hObject, eventdata, handles) end % set variables -numOfReturnedImgs = 20; database = handles.imageDataset.dataset; metric = get(handles.popupmenu_DistanceFunctions, 'Value'); -precAndRecall = zeros(2, 10); +N = 15; +precAndRecall = zeros(2, N); +% sensitivitySpecificity = zeros(2, N); +% fpr_fnr = zeros(2, N); +finPrecRecall = zeros(2, M); -for k = 1:15 + +for k = 1:N + fprintf('---------------------- loop %d ----------------------\n', k); randImgName = randi([0 999], 1); randStrName = int2str(randImgName); - randStrName = strcat('images\', randStrName, '.jpg'); + randStrName = strcat(handles.folder_name, '\', randStrName, handles.img_ext); + imgInfo = imfinfo(randStrName); randQueryImg = imread(randStrName); % extract query image features @@ -307,17 +313,56 @@ function btnPlotPrecisionRecall_Callback(hObject, eventdata, handles) % construct the queryImage feature vector queryImageFeature = [hsvHist autoCorrelogram color_moments meanAmplitude msEnergy wavelet_moments randImgName]; - disp(['Random Image = ', num2str(randImgName), '.jpg']); - [precision, recall] = svm(numOfReturnedImgs, database, queryImageFeature, metric); + disp(['Random Image = ', num2str(randImgName), handles.img_ext]); + [~, ~, cmat] = svm(handles.numOfReturnedImages, database, queryImageFeature, metric, handles.folder_name, handles.img_ext); + label = checkImageLabel(randImgName); + fprintf('label = %d\n', label); + % conf_table = [tp, fp; + % fn, tn] + conf_table = convertConfusionTable(cmat, label); + % precision = tp/tp+fp + % recall = tp/tp+fn + precision = conf_table(1, 1)/(conf_table(1, 1) + conf_table(1, 2)); + recall = conf_table(1, 1)/(conf_table(1, 1) + conf_table(2, 1)); + % sensitivity = recall; + % specificity = conf_table(2, 2)/(conf_table(1, 2) + conf_table(2, 2)); + % fpr = 1-specificity; + % fnr = 1-sensitivity; precAndRecall(1, k) = precision; precAndRecall(2, k) = recall; + % sensitivitySpecificity(1, k) = sensitivity; + % sensitivitySpecificity(2, k) = specificity; + % fpr_fnr(1, k) = fpr; + % fpr_fnr(2, k) = fnr; + fprintf('---------------------- loop %d ----------------------\n', k); end +finPrecRecall(1, m) = mean(precAndRecall(1, :), 2); +finPrecRecall(2, m) = mean(precAndRecall(2, :), 2); figure; -plot(precAndRecall(2, :), precAndRecall(1, :), '--mo'); +plot(finPrecRecall(1, :), '--co'); +hold on; +plot(finPrecRecall(2, :), '--r*'); xlabel('Recall'), ylabel('Precision'); title('Precision and Recall'); -legend('Recall & Precision', 'Location', 'NorthWest'); +legend('Precision', 'Recal', 'Location', 'NorthWest'); +% axis([0 N 0 1]); + +% figure; +% plot(sensitivitySpecificity(1, :), '--co') +% hold on; +% plot(sensitivitySpecificity(2, :), '--r*'); +% xlabel('Specificity'), ylabel('Sensitivity'); +% title('Sensitivity and Specificity'); +% legend('Sensitivity', 'Specificity', 'Location', 'NorthWest'); +% +% figure; +% plot(fpr_fnr(1, :), '--co') +% hold on; +% plot(fpr_fnr(2, :), '--r*'); +% xlabel('False negative rate'), ylabel('False positive rate'); +% title('Fpr and Fnr'); +% legend('Fpr', 'Fnr', 'Location', 'NorthWest'); % --- Executes on button press in btnSelectImageDirectory. From a26a5744bd2580d3e10d439b3b69a7908978519d Mon Sep 17 00:00:00 2001 From: kirk86 Date: Thu, 22 May 2014 21:32:39 +0300 Subject: [PATCH 2/2] added checkImageLabel.m and convertConfusionTable.m to the stage --- checkImageLabel.m | 26 ++++++++++++++++++++++++++ convertConfusionTable.m | 21 +++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 checkImageLabel.m create mode 100644 convertConfusionTable.m diff --git a/checkImageLabel.m b/checkImageLabel.m new file mode 100644 index 0000000..e3d75dc --- /dev/null +++ b/checkImageLabel.m @@ -0,0 +1,26 @@ +function label = checkImageLabel(imageName) +% return the equivalent label of each image + +if (imageName >= 0 && imageName <= 99) + label = 1; +elseif (imageName > 99 && imageName <= 199) + label = 2; +elseif (imageName > 199 && imageName <= 299) + label = 3; +elseif (imageName > 299 && imageName <= 399) + label = 4; +elseif (imageName > 399 && imageName <= 499) + label = 5; +elseif (imageName > 499 && imageName <= 599) + label = 6; +elseif (imageName > 599 && imageName <= 699) + label = 7; +elseif (imageName > 699 && imageName <= 799) + label = 8; +elseif (imageName > 799 && imageName <= 899) + label = 9; +elseif (imageName > 899 && imageName <= 999) + label = 10; +end + +end \ No newline at end of file diff --git a/convertConfusionTable.m b/convertConfusionTable.m new file mode 100644 index 0000000..3d39e5c --- /dev/null +++ b/convertConfusionTable.m @@ -0,0 +1,21 @@ +% convert a confusion matrix into a confusion table of true/false positives/negatives +function conf_table = convertConfusionTable(cfm, label) +% Returns a confusion table in the following format: +% [true positives, false positives, true+false positives; +% false negatives, true negatives, false+true negatives; +% true+false positives, false+true positives, true positives+false positives+false negatives+true negatives] +% for the given label index in the confusion matrix. + +predicted = cfm(:, label); +actual = cfm(label, :); +% for ii = 1:length(cfm) +% actual(1, ii) = cfm(ii, label); +% end +true_pos = predicted(label); +false_pos = sum(actual) - true_pos; +false_neg = sum(predicted) - true_pos; +total = sum(sum(cfm, 2)); %sum column values +true_neg = total - true_pos - false_pos - false_neg; + +conf_table = [true_pos, false_pos; false_neg, true_neg]; +end \ No newline at end of file