Repository: pytorch/ignite

Issue:
ConfusionMatrix axis - labels
I am looking at the [ConfusionMatrix documentation](https://pytorch.org/ignite/generated/ignite.metrics.confusion_matrix.ConfusionMatrix.html ) and I can't understand what axis corresponds to the _predicted values_ and which one to the _actual values_.

In other words, which one of the two following options is correct?
1) https://miro.medium.com/max/1000/1*fxiTNIgOyvAombPJx5KGeA.png
2) https://miro.medium.com/max/1400/1*85t6zbUiQA0fotnhDaJLaA.png
ConfusionMatrix axis - labels
I am looking at the [ConfusionMatrix documentation](https://pytorch.org/ignite/generated/ignite.metrics.confusion_matrix.ConfusionMatrix.html ) and I can't understand what axis corresponds to the _predicted values_ and which one to the _actual values_.

In other words, which one of the two following options is correct?
1) https://miro.medium.com/max/1000/1*fxiTNIgOyvAombPJx5KGeA.png
2) https://miro.medium.com/max/1400/1*85t6zbUiQA0fotnhDaJLaA.png


Discussion:
Thanks for the question, @mfoglio ! It should a standard definition: lines are predictions and rows are targets. The second image: https://miro.medium.com/max/1400/1*85t6zbUiQA0fotnhDaJLaA.png

```python
import torch
from ignite.metrics import ConfusionMatrix

cm = ConfusionMatrix(2)
# update receives (y_preds, y_true)
cm.update((torch.tensor([[0.0, 1.0], [0.0, 1.0]]), torch.tensor([0, 1])))
cm.update((torch.tensor([[0.0, 1.0], [0.0, 1.0]]), torch.tensor([0, 1])))
cm.compute()
> 
tensor([[0, 2],
        [0, 2]])
```

I agree it would be nice to detail that in the docs. If you would like to update it, feel free to send a PR

Thank you @vfdev-5 . I would love to update the doc. Should I create a new branch from `master` or simply commit my edit to `master`? This would be my first time contributing to open source project :) Thanks for the help.
@mfoglio you can do the following:
- fork from this repository
- clone your fork locally and create a branch : `git clone <your-fork>`, `git checkout -b fix-docs-2195`
- try to render docs locally: https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#writing-documentation
  - you can skip katex installation
- make doc changes
- rerender docs and check your modification
- once everything looks good, commit changes: `git commit -a` and add message: `"Fixed #2195, improved ConfusionMatrix docs"`
- push to your fork and create a PR with Github: `git push origin fix-docs-2195`

HTH

Some refs may worth to take a look:
- https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#quickstart-guide-for-first-time-contributors
- https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#writing-documentation
- https://github.com/firstcontributions/first-contributions
Thanks for the question, @mfoglio ! It should a standard definition: lines are predictions and rows are targets. The second image: https://miro.medium.com/max/1400/1*85t6zbUiQA0fotnhDaJLaA.png

```python
import torch
from ignite.metrics import ConfusionMatrix

cm = ConfusionMatrix(2)
# update receives (y_preds, y_true)
cm.update((torch.tensor([[0.0, 1.0], [0.0, 1.0]]), torch.tensor([0, 1])))
cm.update((torch.tensor([[0.0, 1.0], [0.0, 1.0]]), torch.tensor([0, 1])))
cm.compute()
> 
tensor([[0, 2],
        [0, 2]])
```

I agree it would be nice to detail that in the docs. If you would like to update it, feel free to send a PR

Thank you @vfdev-5 . I would love to update the doc. Should I create a new branch from `master` or simply commit my edit to `master`? This would be my first time contributing to open source project :) Thanks for the help.
@mfoglio you can do the following:
- fork from this repository
- clone your fork locally and create a branch : `git clone <your-fork>`, `git checkout -b fix-docs-2195`
- try to render docs locally: https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#writing-documentation
  - you can skip katex installation
- make doc changes
- rerender docs and check your modification
- once everything looks good, commit changes: `git commit -a` and add message: `"Fixed #2195, improved ConfusionMatrix docs"`
- push to your fork and create a PR with Github: `git push origin fix-docs-2195`

HTH

Some refs may worth to take a look:
- https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#quickstart-guide-for-first-time-contributors
- https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#writing-documentation
- https://github.com/firstcontributions/first-contributions

Resolving patch:
diff --git a/ignite/metrics/confusion_matrix.py b/ignite/metrics/confusion_matrix.py
--- a/ignite/metrics/confusion_matrix.py
+++ b/ignite/metrics/confusion_matrix.py
@@ -61,6 +61,11 @@ def binary_one_hot_output_transform(output):
                 model, metrics=metrics, output_transform=lambda x, y, y_pred: (y_pred, y)
             )
 
+    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".
+
     """
 
     def __init__(


Test patch: