How to deal with label that not included in training set when doing prediction

Question:

For example, using supervise learning to classify 5 different people face.
But when test on 6th people face that not in training set, the model will still predict it within the 5 people.
How to let the model predict the 6th and onwards people face as unknown when the model doesn’t train them before?

Asked By: JTCrafter

||

Answers:

You could set a certain threshold for prediction the known classes. Your model should predict from the known classes only if it predicts it with a certain threshold value, otherwise, it will be classified as unknown.

The other (and less preferable) way to deal with this problem is to have another class called unknown even during training and put some random faces as corresponding examples of this class.

Answered By: Anant Mittal

You could set a certain threshold for prediction the known classes. Your model should predict from the known classes only if it predicts it with a certain threshold value, otherwise, it will be classified as unknown.
this option do not work

Answered By: ali çamca
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.