Skip to content
Discussion options

You must be logged in to vote

Hi @cemde,

Sadly we do not have a generic way of sharing data between different metrics. We actually have an old issue for tracking this (#143) however have still not come up with any good solution.
In your specific case, maybe the best way forward would be to create a custom metric that subclasses from Calibration error in this way:

from torchmetrics import CalibrationError
from torchmetrics.functional.classification.calibration_error import _ce_compute
from torchmetrics.utilities.data import dim_zero_cat

class ManyCalibrationMetrics(CalibrationError):
    def compute(self):
        confidences = dim_zero_cat(self.confidences)
        accuracies = dim_zero_cat(self.accuracies)
        r…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Borda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants