1

I have a simple bag of visual words script that I am attempting to use and learn more about. I am trying to learn what to do with images that are different from my trained class. Currently it puts every image into a class. I understand that is how it is designed to function. Could I use a confidence score to sort out the negatives?

For instance, I am using part of it to recognize animals. If I have classes trained for dogs and cats and I show it a bird it will still put it in one of the two that it has trained because that is the entire vocabulary. Is there a way to make a sort of confidence threshold where it doesn't classify the image until it is a 50% match for instance?

Thanks in advance

J. Ray
  • 11
  • 3
  • 1
    Just filter out images for which the prediction probability is less than 0.50. If you're using scikit-learn, several classifiers have a `predict_proba` method which returns predicted class-membership probabilities for each row. – blacksite Apr 11 '17 at 00:34
  • The predict_proba way is not really applicable to the BOW algorithm, at least to the "classical" implementation, because it relies on an SVM classifier which by design does not output such information. And even if it did, it might be quite hard to make sense out of it, since I believe that typically a 2-class classifier will output p(class=2) = 1 - p(class=1) in most implementations – Ben Apr 11 '17 at 12:02

0 Answers0