I have trained a fast text supervised model. I did used a pyfasttext python library to predict the model. Ex: I have data like this.
text - label
The meeting is planned - event
The work should be finished - task
Here, the model predict the label correctly. when planned or the work words occurs in the sentence. But I have list sentences which are non-related to the trained data. For ex: The dog is an animal
res = model.predict_proba_single('the dog is an animal\n')
output:
[(u'event', 0.49999999904767284)]
The output probability should be 0 or no label. Because the sentence is non relevant to all labels. The labels are multi-class. I gave example of two only.
Same thing also occurs in the scikit SGD classifier too.
How do I prevent this wrong prediction?