class_docstr: Test class for `MulticlassMatthewsCorrCoef` metric.
class_docstr_tok: ["Test","class","for","`","MulticlassMatthewsCorrCoef","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_multiclass_matthews_corrcoef_functional(
      self, inputs, ignore_index
  ):
      """Test functional implementation of metric."""
      preds, target = inputs
      if ignore_index is not None:
          target = inject_ignore_index(target, ignore_index)
      self.run_functional_metric_test(
          preds=preds,
          target=target,
          metric_functional=multiclass_matthews_corrcoef,
          reference_metric=partial(
              _sklearn_matthews_corrcoef_multiclass,
              ignore_index=ignore_index,
          ),
          metric_args={
              "num_classes": NUM_CLASSES,
              "ignore_index": ignore_index,
          },
      )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import matthews_corrcoef
  from torchmetrics.classification.matthews_corrcoef import BinaryMatthewsCorrCoef, MatthewsCorrCoef, MulticlassMatthewsCorrCoef, MultilabelMatthewsCorrCoef
  from torchmetrics.functional.classification.matthews_corrcoef import binary_matthews_corrcoef, multiclass_matthews_corrcoef, multilabel_matthews_corrcoef
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES, THRESHOLD
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 2 for calling the TestMulticlassMatthewsCorrCoef obj's underlying member method code with example usage: obj.test_multiclass_matthews_corrcoef_functional(inputs, ignore_index) without return types