precision and recall of two matrices
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two binary matrices 701x701 each. One represents what i got from my algorithm and the other is the groundtruth of the dataset i'm using. In each column i have a 1 if the photo is considered near duplicate, if not is a 0, in each row i have a different photo. Both matrix have the diagonal composed by ones. (The dataset is composed by 701 photos.) I have to calculate recall and precision. The problem is that i don't know wich one is false positive, true positive, false negative or true negative. How can i do it?
댓글 수: 0
채택된 답변
Michael Abboud
2017년 8월 28일
For a typical classification problem where each input image receives a single label you can use the 'confusion' function to calculate these statistics: http://www.mathworks.com/help/nnet/ref/confusion.html
However, it sounds like you have a special case where each input image gives a full output of length 701 where any number of them can be 0s or 1s. My guess is that the above function was not designed for this use, and it may even be that the statistics you mention are not well defined for the type of problem you have described above.
I would recommend that you look at the Wikipedia page on Confusion Matrices, which nicely explains the various statistics: https://en.wikipedia.org/wiki/Confusion_matrix
It may be possible to simply convert each matrix into a long vector of 1s and 0s and from here calculate precision and recall according to the formulas, however I'm not fully convinced this would be the correct approach as it discards a vast amount of semantic meaning and may only serve to provide some ballpark statistics
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!