0
votes

i have a question regarding the predict() function from scikit-learn. I try to validate my trained classifier by testing with data, that is not in the training data and also has a different label. So i basically want, that the classifiers output is: 'new data is not predictable'. How do I implement that? Right now the classifier is just trying to predict the trained labels on the new data with totally different labels. Could you help me out?!

Cheers Richard

The classifer doesn't look at the label when classifying/predicting new data. You should just check if the label is not in the list of labels you trained your model on - rej
Yeah, it is not in the labels of my trained model. No i do not want the classifier to look on the label. But I want the classifier to notice, when a new case is not similar at all to the trained cases, and not just trying to fit any label to it. - nollinger
because it always tries to predict any of the trained labels. It is never like, the new case is just not similar at all, so no label fits - nollinger