Skip to content
New issue

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

Mutliclass Precision Recall Curve, docs not consistent with execution #203

Open
brynhayder opened this issue Aug 13, 2024 · 1 comment
Open

Comments

@brynhayder
Copy link

📚 The doc issue

Here the examples in the documentation shows that the output precisions and thresholds have the same length, but the recalls are one element longer

https://pytorch.org/torcheval/main/generated/torcheval.metrics.functional.multilabel_precision_recall_curve.html#torcheval.metrics.functional.multilabel_precision_recall_curve

However, in my execution the precisions and recalls are the same length (as expected) and the thresholds one element shorter.

Moreover, I see that the missing element in thresholds possibly comes from the use of diff to calculate, but shouldn't there be the same number of elements in each of the arrays output? Aren't P and R functions of threshold?

Suggest a potential alternative/fix

No response

@brynhayder
Copy link
Author

Seems from here that you're appending values to the end of the precisions and recalls for graphical purposes, hence the discrepancy in number of elements I describe above. I didn't notice this anywhere in the documentation.

IMO, coming from the principle of least surprise, it would be better to remove this and leave it to the user to append these values if they want their charts to look a certain way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant