class_docstr: Test class for `MulticlassFBetaScore` metric.
class_docstr_tok: ["Test","class","for","`","MulticlassFBetaScore","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_multiclass_fbeta_score_functional(
      self,
      inputs,
      module,
      functional,
      compare,
      ignore_index,
      multidim_average,
      average,
  ):
      """Test functional implementation of metric."""
      preds, target = inputs
      if ignore_index == -1:
          target = inject_ignore_index(target, ignore_index)
      if multidim_average == "samplewise" and target.ndim < 3:
          pytest.skip(
              "samplewise and non-multidim arrays are not valid"
          )
  
      self.run_functional_metric_test(
          preds=preds,
          target=target,
          metric_functional=functional,
          reference_metric=partial(
              _sklearn_fbeta_score_multiclass,
              sk_fn=compare,
              ignore_index=ignore_index,
              multidim_average=multidim_average,
              average=average,
          ),
          metric_args={
              "ignore_index": ignore_index,
              "multidim_average": multidim_average,
              "average": average,
              "num_classes": NUM_CLASSES,
          },
      )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import confusion_matrix
  from sklearn.metrics import f1_score
  from sklearn.metrics import fbeta_score
  from torch import Tensor
  from torchmetrics.classification.f_beta import BinaryF1Score, BinaryFBetaScore, F1Score, FBetaScore, MulticlassF1Score, MulticlassFBetaScore, MultilabelF1Score, MultilabelFBetaScore
  from torchmetrics.functional.classification.f_beta import binary_f1_score, binary_fbeta_score, multiclass_f1_score, multiclass_fbeta_score, multilabel_f1_score, multilabel_fbeta_score
  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 TestMulticlassFBetaScore obj's underlying member method code with example usage: obj.test_multiclass_fbeta_score_functional(inputs, module, functional, compare, ignore_index, multidim_average, average) without return types