class_docstr: Module level tests for all sktime classifiers.
docstr: Test multioutput classification for all classifiers.
  
  All classifiers should follow the same interface,
  those that do not genuinely should vectorize/broadcast over y.
docstr_tok: ["Test","multioutput","classification","for","all","classifiers",".","All","classifiers","should","follow","the","same","interface",",","those","that","do","not","genuinely","should","vectorize\/broadcast","over","y","."]
code: def test_multioutput(self, estimator_instance):
      """Test multioutput classification for all classifiers.
  
      All classifiers should follow the same interface,
      those that do not genuinely should vectorize/broadcast over y.
      """
      n_instances = 20
      X, y = make_classification_problem(n_instances=n_instances)
      y_mult = pd.DataFrame({"a": y, "b": y})
  
      estimator_instance.fit(X, y_mult)
      y_pred = estimator_instance.predict(X)
  
      assert isinstance(y_pred, pd.DataFrame)
      assert y_pred.shape == y_mult.shape
  
      # the estimator vectorizes iff it does not have the multioutput capability
      vectorized = not estimator_instance.get_tag(
          "capability:multioutput"
      )
      if vectorized:
          assert hasattr(estimator_instance, "classifiers_")
          assert isinstance(
              estimator_instance.classifiers_, pd.DataFrame
          )
          assert estimator_instance.classifiers_.shape == (1, 2)
  
imports: import numpy
  import pandas
  import pytest
  from sktime.classification.tests._expected_outputs import basic_motions_proba, unit_test_proba
  from sktime.datasets import load_basic_motions, load_unit_test
  from sktime.datatypes import check_is_scitype
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils._testing.estimator_checks import _assert_array_almost_equal
  from sktime.utils._testing.panel import make_classification_problem
  from sktime.utils._testing.scenarios_classification import ClassifierFitPredictMultivariate
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 6 for calling the TestAllClassifiers obj's underlying member method code with example usage: obj.test_multioutput(estimator_instance) without return types