class_docstr: Module level tests for all sktime classifiers.
docstr: Test classifier outputs the correct data types and values.
  
  Test predict produces a np.array or pd.Series with only values seen in the train
  data, and that predict_proba probability estimates add up to one.
code: def test_classifier_output(self, estimator_instance, scenario):
      """Test classifier outputs the correct data types and values.
  
      Test predict produces a np.array or pd.Series with only values seen in the train
      data, and that predict_proba probability estimates add up to one.
      """
      n_classes = scenario.get_tag("n_classes")
      X_new = scenario.args["predict"]["X"]
      y_train = scenario.args["fit"]["y"]
      y_pred, decisions = scenario.run(
          estimator_instance, method_sequence=["fit", "predict"]
      )
  
      # check predict
      assert isinstance(y_pred, np.ndarray)
      assert y_pred.shape == (X_new.shape[0],)
      assert np.all(np.isin(np.unique(y_pred), np.unique(y_train)))
      assert isinstance(decisions, np.ndarray)
      assert decisions.shape == (X_new.shape[0],)
      assert decisions.dtype == bool
  
      # predict and update methods should update the state info as an array
      assert isinstance(estimator_instance.get_state_info(), np.ndarray)
  
      # check predict proba (all classifiers have predict_proba by default)
      y_proba, decisions = scenario.run(
          estimator_instance, method_sequence=["predict_proba"]
      )
      assert isinstance(y_proba, np.ndarray)
      assert y_proba.shape == (X_new.shape[0], n_classes)
      np.testing.assert_allclose(y_proba.sum(axis=1), 1)
      assert isinstance(decisions, np.ndarray)
      assert decisions.shape == (X_new.shape[0],)
      assert decisions.dtype == bool
  
file_path: sktime/sktime/classification/early_classification/tests/test_all_early_classifiers.py
imports: import numpy
  from sktime.classification.tests.test_all_classifiers import TestAllClassifiers
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
label_desc: Use image node_id 2 for calling the TestAllEarlyClassifiers obj's underlying member method code with example usage: obj.test_classifier_output(estimator_instance, scenario) without return types