How to use score in predict function

6 views (last 30 days)
Sam Tong
Sam Tong on 24 Oct 2016
Answered: Sam Tong on 26 Oct 2016
The predict function used in classification can have two outputs: label and score. Label is the class that the classifier predicts to be and score, from how I understand, is the confidence of each class. So the label is the class with the highest confidence.
But when I take a look at the score matrix, I find the label does have highest score, and a few others have a little less score, but all of the rest have zero score. How can this be possible? Surely all the other classes can't be equally as bad. Am I not understanding how this function works correctly?
I see this function here by the way:
https://au.mathworks.com/help/stats/compactclassificationensemble.predict.html#bvciha4

Answers (1)

Sam Tong
Sam Tong on 26 Oct 2016
I tried this for some other cases too, and all cases only have one very high score, few lower scores and rest zero score. So is what scores look like. But this doesn't make any sense. I think I misunderstand something. Anybody can be so kind to guide me a little please.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!