Repository: Lightning-AI/torchmetrics

Issue:
Typo in return (forward and compute) of MulticlassConfusionMatrix
## 📚 Documentation

The return description of [MulticlassConfusionMatrix](https://torchmetrics.readthedocs.io/en/stable/classification/confusion_matrix.html#multiclassconfusionmatrix)contains a typo.

It looks like a copy-paste mistake taken from BinaryConfusionMatrix.

We can read:
```
As output to forward and compute the metric returns the following output:

bcm (Tensor): A tensor containing a (2, 2) matrix <--- (Typo here)
```

While a little futher it is stated that:

```
As output of ‘compute’ the metric returns the following output:

confusion matrix: [num_classes, num_classes] matrix
```

We could replace the first return doc statement by:

cm([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)): **A tensor containing a (num_classes, num_classes) matrix.**


Discussion:
Hi! thanks for your contribution!, great first issue!

Resolving patch:
diff --git a/src/torchmetrics/classification/accuracy.py b/src/torchmetrics/classification/accuracy.py
--- a/src/torchmetrics/classification/accuracy.py
+++ b/src/torchmetrics/classification/accuracy.py
@@ -48,6 +48,8 @@ class BinaryAccuracy(BinaryStatScores):
           If ``multidim_average`` is set to ``samplewise``, the metric returns ``(N,)`` vector consisting of a scalar
           value per sample.
 
+    Additional dimension ``...`` will be flattened into the batch dimension.
+
     Args:
         threshold: Threshold for transforming probability to binary {0,1} predictions
         multidim_average:
diff --git a/src/torchmetrics/classification/confusion_matrix.py b/src/torchmetrics/classification/confusion_matrix.py
--- a/src/torchmetrics/classification/confusion_matrix.py
+++ b/src/torchmetrics/classification/confusion_matrix.py
@@ -57,12 +57,11 @@ class BinaryConfusionMatrix(Metric):
       element. Addtionally, we convert to int tensor with thresholding using the value in ``threshold``.
     - ``target`` (:class:`~torch.Tensor`): An int tensor of shape ``(N, ...)``.
 
-    .. note::
-       Additional dimension ``...`` will be flattened into the batch dimension.
-
     As output to ``forward`` and ``compute`` the metric returns the following output:
 
-    - ``bcm`` (:class:`~torch.Tensor`): A tensor containing a ``(2, 2)`` matrix
+    - ``confusion_matrix`` (:class:`~torch.Tensor`): A tensor containing a ``(2, 2)`` matrix
+
+    Additional dimension ``...`` will be flattened into the batch dimension.
 
     Args:
         threshold: Threshold for transforming probability to binary (0,1) predictions
@@ -179,27 +178,9 @@ class MulticlassConfusionMatrix(Metric):
       element. Addtionally, we convert to int tensor with thresholding using the value in ``threshold``.
     - ``target`` (:class:`~torch.Tensor`): An int tensor of shape ``(N, ...)``.
 
-    .. note::
-       Additional dimension ``...`` will be flattened into the batch dimension.
-
     As output to ``forward`` and ``compute`` the metric returns the following output:
 
-    - ``bcm`` (:class:`~torch.Tensor`): A tensor containing a ``(2, 2)`` matrix
-
-    ---
-
-    As input to 'update' the metric accepts the following input:
-
-    - ``preds``: ``(N, ...)`` (int tensor) or ``(N, C, ..)`` (float tensor). If preds is a floating point
-      we apply ``torch.argmax`` along the ``C`` dimension to automatically convert probabilities/logits into
-      an int tensor.
-    - ``target`` (int tensor): ``(N, ...)``
-
-    Additional dimension ``...`` will be flattened into the batch dimension.
-
-    As output of 'compute' the metric returns the following output:
-
-    - ``confusion matrix``: [num_classes, num_classes] matrix
+    - ``confusion_matrix``: [num_classes, num_classes] matrix
 
     Args:
         num_classes: Integer specifing the number of classes
@@ -322,8 +303,6 @@ class MultilabelConfusionMatrix(Metric):
       we convert to int tensor with thresholding using the value in ``threshold``.
     - ``target`` (int tensor): ``(N, C, ...)``
 
-    Additional dimension ``...`` will be flattened into the batch dimension.
-
     As output of 'compute' the metric returns the following output:
 
     - ``confusion matrix``: [num_labels,2,2] matrix


Test patch: