-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Fixed #2195, improved ConfusionMatrix docs #2196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @mfoglio
Looks good, I was just thinking about moving this to the end of the docstring as a note.
Btw, we can see rendered docstring here: https://deploy-preview-2196--pytorch-ignite-preview.netlify.app/generated/ignite.metrics.confusion_matrix.confusionmatrix#ignite.metrics.confusion_matrix.ConfusionMatrix
ignite/metrics/confusion_matrix.py
Outdated
@@ -13,6 +13,10 @@ | |||
class ConfusionMatrix(Metric): | |||
"""Calculates confusion matrix for multi-class data. | |||
|
|||
The confusion matrix is formatted such that columns are predictions and rows are targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this details below after the line L67 and use Note:
:
Note:
The confusion matrix is formatted such that columns are predictions and rows are targets.
For example, if you were to plot the matrix, you could correctly assign to the horizontal axis
the label "predicted values" and to the vertical axis the label "actual values".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great! @vfdev-5 , should I do the edit? If yes, how? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's edit the file locally as suggested. Next, commit and push: git commit -a -m "Updated docstring" && git push origin fix-docs-2195
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Let me know if that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, IMO looks good now! Thanks for the PR !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the guidance!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @mfoglio
Fixes #2195
Description: add information about the format of confusion matrix in the docs
Check list: