Single class classifier

Hello, Newbie here :smiley: so excuse me if it was a silly question :smiley:
I’ve watched the first three lessons and I’ve seen the classification of multiple class like the three types of bears, but if i want to create a single class classifier to state whether it’s a thing or not like the Hotdog-Not-Hotdog, should i use the same model of lesson two with a single dataset of hotdogs for example and a different evaluation metric ? or should insert dummy classes ?


1 Like

Hi !

If you want to say if something is a hotdog or isn’t, there’s still two classes right ? The first is obvisouly hotdog, and the second is… not a hotdog. So you’ll have two kind of labels : either the image represents a hotdog and it’s labeled as such, or it’s not a hotdog and it’s labeled as “not a hot dog”.
It’s still a multi-class classification problem, so you can reuse the exact same structure as in the notebooks.


yes thank you,
Is there a specific data set i should use for “not hot dog” or i should use any random images?


Well anything that’s not a hot dog :wink: It might be better to use, among other images, some that are quite close to hot dogs but not actual hot dogs so the network can learn the small differences. Like maybe sandwiches ? But not only that, you can use ImageNet images for example.



I had this same question too. Say, lets assume that I train the classifier with a variety of non-hotdog images for the “not hotdog” class. How do I know what would be the behavior of the classifier in production when it sees an image that it has not seen before and it does not look like a hotdog.

Will it be able to classify it correctly as not hotdog?

Maybe the answer is that the classifier may make mistakes in this case and if it starts classifying images incorrectly then the classifier might need re-training with images containing the objects/patterns it is classifying incorrectly?