class_docstr: Test class for output tests.
code: def check_get_feature_names_out(self, selection):
      # We want to make sure that this gives us the list of feature names AFTER
      # the feature selector has done its work.
  
      # we create some learners to test on
      classifier_classes = [
          "LogisticRegression",
          "DummyClassifier",
          "LinearSVC",
      ]
      classifiers = [Learner(i) for i in classifier_classes]
      regressor_classes = [
          "LinearRegression",
          "SVR",
          "AdaBoostRegressor",
      ]
      regressors = [Learner(i) for i in regressor_classes]
  
      # we create some minimal training data for our learners
      train_fs, _, _ = make_regression_data(
          num_examples=20, num_features=6
      )
  
      # If the selection param is `True`, set a couple of feature to 0-values only,
      # so the feature selector will remove them when training
      if selection:
          train_fs.features[:, [0, 3]] = 0
          feature_names = ["f2", "f3", "f5", "f6"]
      else:
          feature_names = ["f1", "f2", "f3", "f4", "f5", "f6"]
  
      # test whether we get the expected feature names from the
      # `get_feature_names_out()` method
      for classifier in classifiers:
          classifier.train(train_fs, grid_search=False)
          assert (
              list(classifier.get_feature_names_out()) == feature_names
          )
      for regressor in regressors:
          regressor.train(train_fs, grid_search=False)
          assert (
              list(regressor.get_feature_names_out()) == feature_names
          )
  
imports: import csv
  import json
  import re
  import unittest
  import warnings
  from ast import literal_eval
  from collections import defaultdict
  from itertools import chain, product
  from pathlib import Path
  from unittest.mock import Mock, patch
  import numpy
  import pandas
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from sklearn.model_selection import ShuffleSplit, learning_curve
  from sklearn.naive_bayes import MultinomialNB
  from skll.data import FeatureSet, NDJReader, NDJWriter, Reader
  from skll.experiments import run_configuration
  from skll.experiments.output import _compute_ylimits_for_featureset
  from skll.learner import Learner
  from skll.utils.constants import VALID_TASKS
  from skll.utils.logging import close_and_remove_logger_handlers, get_skll_logger
  from skll.utils.testing import backward_compatibility_dir, config_dir, create_jsonlines_feature_files, fill_in_config_options, fill_in_config_paths, fill_in_config_paths_for_single_file, make_classification_data, make_digits_data, make_regression_data, other_dir, output_dir, remove_jsonlines_feature_files, test_dir, tests_dir, train_dir, unlink
label_desc: Use image node_id 26 for calling the TestOutput obj's underlying member method code with example usage: obj.check_get_feature_names_out(selection) without return types