class_docstr: Module level tests for all sktime regressors.
class_docstr_tok: ["Module","level","tests","for","all","sktime","regressors","."]
docstr: Test regressor 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.
docstr_tok: ["Test","regressor","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_regressor_output(self, estimator_instance, scenario):
      """Test regressor 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.
      """
      X_new = scenario.args["predict"]["X"]
      # we use check_is_scitype to get the number instances in X_new
      #   this is more robust against different scitypes in X_new
      _, _, X_new_metadata = check_is_scitype(
          X_new, "Panel", return_metadata=True
      )
      X_new_instances = X_new_metadata["n_instances"]
  
      # run fit and predict
      y_pred = scenario.run(
          estimator_instance, method_sequence=["fit", "predict"]
      )
  
      # check predict
      assert isinstance(y_pred, np.ndarray)
      assert y_pred.shape == (X_new_instances,)
      assert np.issubdtype(y_pred.dtype, np.floating)
  
file_path: sktime/sktime/regression/tests/test_all_regressors.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import check_is_scitype
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils._testing.panel import make_regression_problem
  from sktime.utils._testing.scenarios_classification import ClassifierFitPredictMultivariate
label_desc: Use image node_id 2 for calling the TestAllRegressors obj's underlying member method code with example usage: obj.test_regressor_output(estimator_instance, scenario) without return types