We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The metrics giving access to curve are not always returning Xaxis - Yaxis in the same order (considering the common usage of the curve).
pred = torch.tensor([0, 0.1, 0.8, 0.4]) target = torch.tensor([0, 1, 1, 0]) roc = ROC(task="binary") fpr, tpr, thresholds = roc(pred, target) # in ROC curve Xaxis = fpr -------- Yaxis = tpr pr_curve = PrecisionRecallCurve(task="binary") precision, recall, thresholds = pr_curve(pred, target) # in precision recall curve Xaxis = recall -------- Yaxis = precision
pred = torch.tensor([0, 0.1, 0.8, 0.4]) target = torch.tensor([0, 1, 1, 0]) roc = ROC(task="binary") fpr, tpr, thresholds = roc(pred, target) # in ROC curve Xaxis = fpr -------- Yaxis = tpr pr_curve = PrecisionRecallCurve(task="binary") recall, precision, thresholds = pr_curve(pred, target) # in precision recall curve Xaxis = recall -------- Yaxis = precision
TorchMetrics 1.2
We are trying to be metric agnostic during automated plot creation. So far we added a constant object:
METRIC_AXIS = { ROC: {"x": 0, "y": 1}, PrecisionRecallCurve: {"x": 1, "y": 0}, }
The text was updated successfully, but these errors were encountered:
The goal here has been to be consistent with the implementations in sklearn: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html which has this ordering.
Sorry, something went wrong.
@SkafteNicki see #2207 (comment) (thanks again for the answer)
No branches or pull requests
🐛 Bug
The metrics giving access to curve are not always returning Xaxis - Yaxis in the same order (considering the common usage of the curve).
To Reproduce
Expected behavior
Environment
TorchMetrics 1.2
Additional context
We are trying to be metric agnostic during automated plot creation.
So far we added a constant object:
The text was updated successfully, but these errors were encountered: