Course 3, Week 1, "When To Change...": confusing formula

Based on the lecture, this is the given formula:

We are still training the model based on Is/Isn’t Cat, but the weight factor is just a separate enhancement that helps us rule out inappropriate images.

My problem is: if inappropriate images’ true labels are 1, then they are identified as cats. If their true labels are 0, then they are identified as not cats. Regardless, since if I(y_hat != y) = 0 then w*0 = 0 means that weight is disregarded, we are essentially only applying the punishing weights to misclassified inappropriate images. This feels underwhelming. Don’t we want to apply punishing weights to all inappropriate images regardless of their accuracy stats?

With the current formula, if inappropriate images have true label 0, then a model (A) that accidentally misclassifies a few of them would have more error than a model (B) that doesn’t make any mistakes with them if inappropriate images were to have true label 1. But in this case we prefer A more since it mostly thinks inappropriate images are not cats, but metric would select B, which thinks inappropriate images are cats (i.e. cat = pusy). I guess we are putting full faith in that inappropriate images have true label 0 so the formula works as intended?

Functional logic:
Assume inappropriate images are not cats (y=0). If classification is correct, then no punishment needed (w*0) since the algorithm correctly identifies that it is / isn’t a cat. If classification is misclassified, then there will be two cases. 1) the image is inappropriate: this means the algorithm thinks the image is a cat but it isn’t and it is inappropriate (severe misclassification), so we punish it with heavy weight w=10*1. 2) the image isn’t inappropriate: this is just a general misclassification, and the image is perfectly fine so we don’t need to punish it or whatsoever, so we proceed with w=1*1.

Actually I kinda see why this logic makes sense.

Sorry about the train of thought. A quick confirmation on the functional logic would help. Thank you so much for your time and help!

It’s okay to have misclassified outputs, but the model that does a better job is outputting some porn images for misclassified cases. We don’t want that, so we want to punish the specific case of “classifying porn images as cats” more to avoid manually selecting a model of such nature, by giving porn images more weight.