Per Class Metrics #678
Replies: 1 comment 2 replies
-
Hi @VerwimpEli , thank you for reaching out! You are right, currently accuracy works at the level of experience and does not partition its value according to the different classes. The main downside I see is that we risk to produce a large variety of metrics which are basically slight modifications of the existing ones. However, I think accuracy by class is quite used and it would be helpful for the user to have it as a first-level metric. I think you can proceed with the implementation and open a PR as soon as you are ready so that we can better discuss. To avoid the Let me know what you think 😄 |
Beta Was this translation helpful? Give feedback.
-
I believe right now metrics like
accuracy
andloss
calculate the average loss across all samples within an experience. But, in some cases it's more interesting to look at the average class accuracy, or even at the accuracy on a per class basis. For instance, in datasets where the classes are very imbalanced across all experiences (e.g. COCO classification).Implementing a separate
Metric
that keeps track of a metric per class wouldn't be hard. But maybe it's better to implement it on a lower level, in a similar fashion as how theMean
andSum
utilities work, such that other metrics can be used to get the average of all examples in an experience and the average per class in the experience, based on some parameter in the metric.In theory, it should actually be already possible to get accuracy results on a per class basis through the confusion matrix metric, but that'd be kind of ugly in my opinion.
I'd be able to implement this, but wanted to discuss a bit first what the best way to do this would be.
Beta Was this translation helpful? Give feedback.
All reactions