How can I add decision threshold to KNN classifier?
I am using the KNN classifier with BoW descriptor histograms. I would like to find a threshold between the matches. So that if the value is higher than a threshold consider that the classification has been done well, if not, show the best two classes of the results. How can I do that?
To me it seems you need an
if-loop
which first checks if outputA and outputB (match scores) are above a certain value. If not compare both and take the highest?