- · AdaBoostM1 scores range from -inf to inf.
- · Bag scores range from 0 to 1.
Custom Classification Loss: which is the role of S?
1 view (last 30 days)
Show older comments
Elena Casiraghi
on 21 Aug 2019
Commented: Elena Casiraghi
on 29 Aug 2019
Dear,
I have a classification problems with labels 1,..,5.
Since the label is a score related to a grade, I would to compute the Loss by computing the
distance between the triue label and the predicted label
So, if:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234804/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234805/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234806/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234807/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234808/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234806/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234810/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234805/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234807/image.png)
I would like to measure the loss ass:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234813/image.png)
However, how can I use the score to compute the Loss?
The score S contains ngative values. Whats the meaning of that score?
from the explanation in matlab help it seems that the more the S value is low (negative), the more the point is "distant from that class"
If I have 5 labels and for x(i) I have
than this means that x(i) would have predicted label = 3
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234814/image.png)
I used kfoldPredict to understand what's happening and it should be right.
Could anyone confirm me?
0 Comments
Accepted Answer
Dinesh Yadav
on 29 Aug 2019
A classification score represents the confidence of the classifier into a class. The range of score depends on ensemble type. For example-
Therefore, if your scores range from -inf to +inf the class corresponding to the highest score is chosen. In the example you gave its label 3. The value 0 is highest among all.
I am providing the link to documentation below for score in kfoldPredict.
More Answers (0)
See Also
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!