Hi, I wanted to try the example of the multiclass case for precision metric from the ignite library with Average=True. I used the exact same values and code but still got an error. I was interested to test out different cases and binary & multilabel seem to work, but the multiclass case is not working as it should work like in the docs.
In the docs link below, you can find the same code block for the multiclass case, and they get the precision as 0.6111…
I would be very grateful if someone could point out where I was going wrong, or if I need to do something else to test the multiclass case for precision.
The error comes from the process_function function you used in the Engine. In this very simple example, the output of this function feeds directly into the metric as a demonstration. Note that data[0] is y_pred. It means that data[0][0] is [0.0266, 0.1719, 0.3055] and data[0][0] is [0.6886, 0.3978, 0.8176]. This can’t be correctly used in the metric.