Hi fastai practitioners ! I have a question related to metrics and I wonder if someone had a similar requirements. I am not sure that this post is in the right section, so sorry in advance if this is not the case
I am working on a classification problem with objects being labelled across 17 numerical classes (class ‘1’, class ‘2’, class ‘3’ … class ‘17’)
I am looking for a metric that would provide me the “absolute error within a range”, ie if we are able to predict either the class or the class just before or just after. So for example
for class ‘2’ objects, I have 50 predictions being ‘2’, 25 being ‘1’ , 20 being ‘3’ and 5 being ‘4’
The metric I am looking for is that I call ‘Mean absolute error within a range’ will be :
(50 x absolute((2 - 2)) + 25 x absolute((1 -2)) + 20 x absolute((3 - 2)) + 5 x absolute((2 - 4)) ) / 100 = 0.55
Do you know if one of the existing metric in fastai would be able to help me here or should I create this new metric from scratch ?