2
$\begingroup$

For calculating loss arose by classification we do this:

If $y (w \cdot x + b) > 0$: $\text{no loss}$

If $y (w \cdot x + b) < 0$: $\text{loss} = −y (w \cdot x + b)$

So here what about the points exactly on decision boundary? How do we classify and compute their loss? (since it would become 0)

$\endgroup$
1
$\begingroup$

The answer is irrelevant for two reasons. First, on the decision boundary, both equations (the one for correct classification, and the one for incorrect classification) generate a loss of 0, so it doesn't matter which one you use.

The second reason is that computationally, you will never be exactly on the decision boundary, because the computer uses numbers with finite precision, so there is always a small error.

$\endgroup$
3
$\begingroup$

It is up to the user how they want to handle such cases. The loss for the points on the decision boundary will be 0. It's a design decision the user has to take. One example could be to consider such cases in misclassification and update your weights while training.

If $y (w \cdot x + b) > 0$: $\text{no loss}$

If $y (w \cdot x + b) \leq 0$: $\text{loss} = −y (w \cdot x + b)$

During inference, if such cases arise, you can call a random classifier to classify it in one of the classes.

$\endgroup$

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.