0
$\begingroup$

Say, I'm training a binary classifier to classify Dog vs Cat. Now, say I train my model only on one imagee ( cat). Now I mirror this cat image that I used to train my model. Now on the mirror image I want to make predciton.

Question : What will my model predict ? does it predict cat, or will it randomly predict either cat or dog

I think it will predict cat beacuse the parameters have been trained only for cat, so irrespective of any input data, the parameters will support prediction for cat. Am I correct ? is my reasoning correct?

$\endgroup$
1
  • $\begingroup$ It depends on the type of model but if you have only 1 class in the training set, the model will probably assume that 100% of the instances are "cat" since it doesn't know anything else. Actually it's likely that the training will just fail with an error. $\endgroup$
    – Erwan
    Dec 10 '20 at 12:44
1
$\begingroup$

It may predict either a cat or a dog depending on your descriptor for cats and dogs, and on your learning algorithm. This is illustrated on the picture below. If the mirrored cat happens to be on the same side of the separating line as the training cat, then it will be classified as a cat. Otherwise, it will be classified as a dog.

enter image description here

$\endgroup$
0
$\begingroup$

For a binary classifier we should need to have a Balanced dataset, In your case its going to predict only cat since it hasn't seen any data for dog. On mirroring the image the coordinates of the cat is only changed but the features or shape of the cat is not changed. This makes the modal predict that as cat.

In general if any of the parameters are matched with cat it defines that to be cat, since the modal is trained with only one category,

$\endgroup$
3
  • $\begingroup$ I assumed this to be true as well but have a look at @vladislav's answer that makes sense as well. I'm confused again $\endgroup$ Dec 10 '20 at 13:50
  • 1
    $\begingroup$ @blacksheep369 It feels like you have CNNs in mind when you talk about "learning features of a cat". Conv layers of a CNN learn features but they do not know whether these features belong to a cat or a dog. It is the job of the last FC layers to learn the decision curve that separates the features into 2 categories. I denoted these features schematically $w_1$ and $w_2$. You may assume that they are outputs of your conv layers. Your net learned that certain $w_1$ and $w_2$ is a cat and moved the separating line to include that point. But it has too little info where exactly to put this line. $\endgroup$ Dec 11 '20 at 1:13
  • $\begingroup$ @blacksheep369 The vladislav's answer will be applicable in case of a new cat(new breed) or the cat which the modal hasn't seen. In this scenario it's all about mirrored cat so the segmented image of the cat which is used in training is going to exactly match the mirrored cat. Note: Since the modal is only trained with cat the decision curve will be made in such a way to capture all the cats in the training modal. And our mirrored cat will have the same pixels which is used in training before mirroring the image. $\endgroup$
    – Ajithram
    Dec 11 '20 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.