class_docstr: Test class for regression tests.
code: def test_dummy_regressor_predict(self):
      # create a hard-coded set of labels
      prng = np.random.RandomState(123456789)
      train_labels = prng.random_sample(20)
  
      for model_args, expected_output in zip(
          [
              {"strategy": "mean"},
              {"strategy": "median"},
              {"strategy": "quantile", "quantile": 0.5},
              {"strategy": "quantile", "quantile": 0.0},
              {"strategy": "quantile", "quantile": 1.0},
              {"strategy": "constant", "constant": 1},
          ],
          [
              np.ones(10) * np.mean(train_labels),
              np.ones(10) * np.median(train_labels),
              np.ones(10) * np.median(train_labels),
              np.ones(10) * np.min(train_labels),
              np.ones(10) * np.max(train_labels),
              np.ones(10),
          ],
      ):
          yield self.check_dummy_regressor_predict, model_args, train_labels, expected_output
  
imports: import math
  import re
  import unittest
  import warnings
  from itertools import chain, product
  import numpy
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy.stats import pearsonr
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import LinearRegression, LogisticRegression
  from skll.config import _setup_config_parser
  from skll.data import FeatureSet, NDJReader, NDJWriter
  from skll.experiments import run_configuration
  from skll.learner import Learner
  from skll.learner.utils import rescaled
  from skll.utils.constants import CLASSIFICATION_ONLY_METRICS
  from skll.utils.testing import config_dir, fill_in_config_paths_for_fancy_output, make_regression_data, other_dir, output_dir, test_dir, train_dir, unlink
label_desc: Use image node_id 27 for calling the TestRegression obj's underlying member method code with example usage: obj.test_dummy_regressor_predict() without return types