class_docstr: Test class for regression tests.
docstr: Test that ensemble models work via a config file.
docstr_tok: ["Test","that","ensemble","models","work","via","a","config","file","."]
code: def test_ensemble_model_config_file(self):
      """Test that ensemble models work via a config file."""
      config_template_path = (
          config_dir / "test_ensemble_evaluate.template.cfg"
      )
      config_path = config_dir / "test_ensemble_evaluate.cfg"
  
      # create and write out train and test sets
      train_fs, test_fs, _ = make_regression_data(
          num_examples=2000, num_features=3
      )
      train_file = train_dir / "fancy_train.jsonlines"
      train_writer = NDJWriter(train_file, train_fs)
      train_writer.write()
      test_file = test_dir / "fancy_test.jsonlines"
      test_writer = NDJWriter(test_file, test_fs)
      test_writer.write()
  
      # create configuration file and run it
      config = _setup_config_parser(
          config_template_path, validate=False
      )
      config.set(
          "Input",
          "train_file",
          str(train_dir / "fancy_train.jsonlines"),
      )
      config.set(
          "Input", "test_file", str(test_dir / "fancy_test.jsonlines")
      )
      config.set("Output", "results", str(output_dir))
      config.set("Output", "logs", str(output_dir))
      config.set("Output", "predictions", str(output_dir))
  
      with open(config_path, "w") as new_config_file:
          config.write(new_config_file)
  
      run_configuration(config_path, quiet=True, local=True)
  
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 13 for calling the TestRegression obj's underlying member method code with example usage: obj.test_ensemble_model_config_file() without return types